diff options
| author | rubenwardy <rw@rubenwardy.com> | 2019-11-14 23:38:11 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2019-11-14 23:38:11 +0000 |
| commit | 50892ce9fc6a44475b447b90909f83c2148f8096 (patch) | |
| tree | f28bcaf363e9d0e6ccd57b741b23963d01c3475f /app/views | |
| parent | 2e14836ed6500982e846bdf34bd7e82b5dd1ae4a (diff) | |
| download | cheatdb-50892ce9fc6a44475b447b90909f83c2148f8096.tar.xz | |
Add debug warning to template
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/__init__.py | 4 |
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) |
