mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 14:37:36 +01:00
Add debug warning to template
This commit is contained in:
parent
2e14836ed6
commit
50892ce9fc
@ -135,6 +135,12 @@
|
||||
<a href="{{ url_for('flatpage', path='policy_and_guidance') }}">{{ _("Policy and Guidance") }}</a> |
|
||||
<a href="{{ url_for('flatpage', path='help/reporting') }}">{{ _("Report / DMCA") }}</a> |
|
||||
<a href="{{ url_for('user_list_page') }}">{{ _("User List") }}</a>
|
||||
|
||||
{% if debug %}
|
||||
<p style="color: red">
|
||||
DEBUG MODE ENABLED
|
||||
</p>
|
||||
{% endif %}
|
||||
</footer>
|
||||
|
||||
<script src="/static/jquery.min.js"></script>
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user