diff --git a/app/templates/base.html b/app/templates/base.html index 05b12bc..e39097c 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -135,6 +135,12 @@ {{ _("Policy and Guidance") }} | {{ _("Report / DMCA") }} | {{ _("User List") }} + + {% if debug %} +

+ DEBUG MODE ENABLED +

+ {% endif %} diff --git a/app/views/__init__.py b/app/views/__init__.py index c99ca03..3abb7ee 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -25,6 +25,10 @@ from urllib.parse import urlparse from sqlalchemy.sql.expression import func cache = SimpleCache() +@app.context_processor +def inject_debug(): + return dict(debug=app.debug) + @app.template_filter() def throw(err): raise Exception(err)