So, I am upgrading to the new version of Django ( 1,8 ). I am currently on version 1.7 , and I am struggling to get my production server to listen on new settings in 1.8 .
As in 1.8 , any TEMPLATE_* settings are deprecated according to the documentation and have been replaced with TEMPLATES .
I'm trying to just continue, as it was, but I want to move on to the new settings before the expiration date.
In my 1.7 settings, I only have two old settings, which are now deprecated as follows:
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS TEMPLATE_CONTEXT_PROCESSORS += ("django.core.context_processors.request",) TEMPLATE_DIRS = ( os.path.join(BASE_DIR, 'templates'), )
In the new 1.8 settings, I have the following:
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ # Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this # list if you haven't customized them: 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.request', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages', ], }, }, ]
However, when I use these settings, my production server cannot find the template files, but my local work is just fine.
EDIT . It turns out that the missing APP_DIRS setting APP_DIRS losing chaos with the up and down function. I have all my templates in one directory, not in applications, but this seems to have solved the problem.