diff options
Diffstat (limited to 'youtube/__init__.py')
-rw-r--r-- | youtube/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube/__init__.py b/youtube/__init__.py index 534b9f8..d8171c0 100644 --- a/youtube/__init__.py +++ b/youtube/__init__.py @@ -1,5 +1,6 @@ import flask import settings +import traceback yt_app = flask.Flask(__name__) yt_app.url_map.strict_slashes = False @@ -30,3 +31,7 @@ def commatize(num): if isinstance(num, str): num = int(num) return '{:,}'.format(num) + +@yt_app.errorhandler(500) +def error_page(e): + return flask.render_template('error.html', traceback=traceback.format_exc()), 500 |