aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2019-11-14 23:38:11 +0000
committerrubenwardy <rw@rubenwardy.com>2019-11-14 23:38:11 +0000
commit50892ce9fc6a44475b447b90909f83c2148f8096 (patch)
treef28bcaf363e9d0e6ccd57b741b23963d01c3475f /app/views
parent2e14836ed6500982e846bdf34bd7e82b5dd1ae4a (diff)
downloadcheatdb-50892ce9fc6a44475b447b90909f83c2148f8096.tar.xz
Add debug warning to template
Diffstat (limited to 'app/views')
-rw-r--r--app/views/__init__.py4
1 files changed, 4 insertions, 0 deletions
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)