TEMPLATE_LOADERS deprecated¶
This setting is deprecated since Django version 1.8. Set the LOADERS option of a DjangoTemplates backend instead.
Deprecated feature¶
Deprecated TEMPLATE_LOADERS
setting used.
""" settings.py """
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
Migration path¶
As of Django 1.8 you should set loaders
option in the 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',
'OPTIONS': {
'loaders': (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
),
}
},
]