Under the flask, I want to include / exclude material in the jinja template based on whether we are in debug mode or not. I am not discussing whether this is a good or bad idea (I would vote βbadβ, but I want to do this only for this case, nevertheless :-), since this can happen?
I was hoping that I would not have to explicitly pass the variable to the template, unlike this:
render_template('foo.html', debug=app.debug)
not that it would be too complicated, but I would rather simply magically say in the template:
{% if debug %} go crazzzzy {% endif %}
Is there some kind of default variable that just looks around waiting for me to pounce?
source share