I am using virtualenv and I want to know what the TEMPLATE_DIRS
in settings.py
should be, for example if I make a templates folder in the root of my project folder.
TEMPLATE_DIRS deprecated This setting is deprecated since Django version 1.8.
deprecated
""" settings.py """
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'templates/'),
)
correct
""" settings.py """
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [ os.path.join(BASE_DIR, 'templates') ],
'APP_DIRS': True,
...
},
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With