settings fixes master
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Thu, 13 Jun 2019 13:03:39 +0000 (14:03 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Thu, 13 Jun 2019 13:03:39 +0000 (14:03 +0100)
eatslugs/settings.py

index 5653f70621edd2a31f8eee7453d3e2377c54069a..84c9b901a730d2d6074e6f04d6a923df6dfea13c 100644 (file)
@@ -42,12 +42,6 @@ import string
 key_chars = "%s%s%s" %(string.letters, string.digits, '+-()_#~')
 SECRET_KEY = "".join([random.choice(key_chars) for a in range(0,50)])
 
-# List of callables that know how to import templates from various sources.
-TEMPLATE_LOADERS = (
-    'django.template.loaders.filesystem.load_template_source',
-    'django.template.loaders.app_directories.load_template_source',
-)
-
 MIDDLEWARE_CLASSES = (
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
@@ -56,10 +50,6 @@ MIDDLEWARE_CLASSES = (
 
 ROOT_URLCONF = 'urls'
 
-TEMPLATE_DIRS = (
-    os.path.join(topdir, 'templates')
-)
-
 INSTALLED_APPS = (
     'django.contrib.admin',
     'django.contrib.auth',
@@ -69,12 +59,23 @@ INSTALLED_APPS = (
     'recipes',
 )
 
-TEMPLATE_CONTEXT_PROCESSORS = (
-    'django.contrib.auth.context_processors.auth',
-    'django.core.context_processors.debug',
-    'django.core.context_processors.i18n',
-    'generic.context_processors.media',
-)
+TEMPLATES = [
+    {
+        'BACKEND': 'django.template.backends.django.DjangoTemplates',
+        'DIRS': [os.path.join(topdir, 'templates'),],
+        'APP_DIRS': True,
+        'OPTIONS': {
+            'context_processors': [
+                'django.contrib.auth.context_processors.auth',
+                'django.core.context_processors.debug',
+                'django.core.context_processors.i18n',
+                'generic.context_processors.media',
+            ],
+            'debug': True,
+        },
+    },
+]
+
 
 try:
     from localsettings import *