Find more articles in our new Python Knowledge Base

TEMPLATE_DIRS deprecated

This setting is deprecated since Django version 1.8. Set the DIRS option of a [DjangoTemplates backend](https://docs.djangoproject.com/en/1.8/topics/templates/#module-django.template.backends.django) instead.

Deprecated feature

Deprecated TEMPLATE_DIRS setting used.

""" settings.py """

TEMPLATE_DIRS = [
    "path/to/my/templates",
]

Migration path

As of Django 1.8 you should set DIRS option within TEMPLATES setting. It defines where the engine should look for template source files, in search order.

""" settings.py """

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