mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-24 23:11:33 +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='policy_and_guidance') }}">{{ _("Policy and Guidance") }}</a> |
|
||||||
<a href="{{ url_for('flatpage', path='help/reporting') }}">{{ _("Report / DMCA") }}</a> |
|
<a href="{{ url_for('flatpage', path='help/reporting') }}">{{ _("Report / DMCA") }}</a> |
|
||||||
<a href="{{ url_for('user_list_page') }}">{{ _("User List") }}</a>
|
<a href="{{ url_for('user_list_page') }}">{{ _("User List") }}</a>
|
||||||
|
|
||||||
|
{% if debug %}
|
||||||
|
<p style="color: red">
|
||||||
|
DEBUG MODE ENABLED
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="/static/jquery.min.js"></script>
|
<script src="/static/jquery.min.js"></script>
|
||||||
|
@ -25,6 +25,10 @@ from urllib.parse import urlparse
|
|||||||
from sqlalchemy.sql.expression import func
|
from sqlalchemy.sql.expression import func
|
||||||
cache = SimpleCache()
|
cache = SimpleCache()
|
||||||
|
|
||||||
|
@app.context_processor
|
||||||
|
def inject_debug():
|
||||||
|
return dict(debug=app.debug)
|
||||||
|
|
||||||
@app.template_filter()
|
@app.template_filter()
|
||||||
def throw(err):
|
def throw(err):
|
||||||
raise Exception(err)
|
raise Exception(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user