Up Version with API

This commit is contained in:
Vyacheslav Anzhiganov 2016-06-15 02:41:07 +03:00
parent b41897dc98
commit 2e2be4a489
2 changed files with 16 additions and 15 deletions

View file

@ -19,25 +19,25 @@ babel = Babel(app)
app.register_blueprint(viewAdministrator) app.register_blueprint(viewAdministrator)
@app.errorhandler(404) # @app.errorhandler(404)
def page_not_found(e): # def page_not_found(e):
return render_template('errors/404.html'), 404 # return render_template('errors/404.html'), 404
@app.errorhandler(403) # @app.errorhandler(403)
def page_not_found(e): # def page_not_found(e):
return render_template('errors/403.html'), 403 # return render_template('errors/403.html'), 403
@app.errorhandler(410) # @app.errorhandler(410)
def page_not_found(e): # def page_not_found(e):
return render_template('errors/410.html'), 410 # return render_template('errors/410.html'), 410
@app.errorhandler(500) # @app.errorhandler(500)
def page_not_found(e): # def page_not_found(e):
print e # print e
return render_template('errors/500.html'), 500 # return render_template('errors/500.html'), 500
@app.before_request @app.before_request
@ -56,7 +56,8 @@ def before_first_request():
app.logger.error(e) app.logger.error(e)
# TODO: code to email alert # TODO: code to email alert
# g.endpoint = request.endpoint.replace('.', '/') # g.endpoint = request.endpoint.replace('.', '/')
return render_template('errors/500.html'), 500 # return render_template('errors/500.html'), 500
return 'maintenance', 500
@app.after_request @app.after_request

View file

@ -4,7 +4,7 @@ from setuptools import setup
setup( setup(
name='SWSCloudCore', name='SWSCloudCore',
version='2.5.6', version='2.5.7',
author='Vyacheslav Anzhiganov', author='Vyacheslav Anzhiganov',
author_email='hello@anzhiganov.com', author_email='hello@anzhiganov.com',
packages=[ packages=[