Find more articles in our new Python Knowledge Base

TEMPLATE_DEBUG deprecated

This setting sets the output that the template system should use for invalid (e.g. misspelled) variables. The default value is an empty string ''. This setting is deprecated since Django version 1.8. Set the TEMPLATE_DEBUG option in the OPTIONS of a DjangoTemplates backend instead.

Deprecated feature

Deprecated TEMPLATE_DEBUG setting used.

""" settings.py """

TEMPLATE_DEBUG = True

Migration path

As of Django 1.8 you should set debug option in the OPTIONS of a DjangoTemplates backend instead.

""" settings.py """

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'APP_DIRS': True,
        'DIRS': '/path/to/my/templates',
        'OPTIONS': {
             'debug': True,
         }
    },
]