From 2e2be4a489e383cfb5ea14e7f00f35e01316e2d2 Mon Sep 17 00:00:00 2001 From: vanzhiganov Date: Wed, 15 Jun 2016 02:41:07 +0300 Subject: [PATCH] Up Version with API --- SWSCloudAdministrator/application.py | 29 ++++++++++++++-------------- setup.py | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/SWSCloudAdministrator/application.py b/SWSCloudAdministrator/application.py index 8f84378..55e7d9a 100644 --- a/SWSCloudAdministrator/application.py +++ b/SWSCloudAdministrator/application.py @@ -19,25 +19,25 @@ babel = Babel(app) app.register_blueprint(viewAdministrator) -@app.errorhandler(404) -def page_not_found(e): - return render_template('errors/404.html'), 404 +# @app.errorhandler(404) +# def page_not_found(e): +# return render_template('errors/404.html'), 404 -@app.errorhandler(403) -def page_not_found(e): - return render_template('errors/403.html'), 403 +# @app.errorhandler(403) +# def page_not_found(e): +# return render_template('errors/403.html'), 403 -@app.errorhandler(410) -def page_not_found(e): - return render_template('errors/410.html'), 410 +# @app.errorhandler(410) +# def page_not_found(e): +# return render_template('errors/410.html'), 410 -@app.errorhandler(500) -def page_not_found(e): - print e - return render_template('errors/500.html'), 500 +# @app.errorhandler(500) +# def page_not_found(e): +# print e +# return render_template('errors/500.html'), 500 @app.before_request @@ -56,7 +56,8 @@ def before_first_request(): app.logger.error(e) # TODO: code to email alert # 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 diff --git a/setup.py b/setup.py index 04f1e06..a914a4b 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup setup( name='SWSCloudCore', - version='2.5.6', + version='2.5.7', author='Vyacheslav Anzhiganov', author_email='hello@anzhiganov.com', packages=[