Do you know if it is possible to know in a django template if the TEMPLATE_DEBUG flag is set?
I would like to disable my google analytics script when I am running my
Django 1.9+
settings.py:
INTERNAL_IPS = (
'127.0.0.1',
)
Templates:
{% if debug %}
https://docs.djangoproject.com/en/dev/ref/settings/#internal-ips says:
A list of IP addresses, as strings, that:
- Allow the debug() context processor to add some variables to the template context.
The debug context processor is in the default settings.py.