From 0b546f44f00b16137e77a3736b41f769b96f70e2 Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Wed, 10 Jul 2013 15:58:33 +0100 Subject: [PATCH 1/3] And the last changes for 1.4 --- eatslugs/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eatslugs/settings.py b/eatslugs/settings.py index 5653f70..cd97c96 100644 --- a/eatslugs/settings.py +++ b/eatslugs/settings.py @@ -44,8 +44,8 @@ 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', + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', ) MIDDLEWARE_CLASSES = ( -- 2.30.2 From 00029ea4c856e80a082639c2c8df127864a76499 Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Thu, 13 Jun 2019 14:00:22 +0100 Subject: [PATCH 2/3] Update settings --- eatslugs/settings.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/eatslugs/settings.py b/eatslugs/settings.py index cd97c96..1eec832 100644 --- a/eatslugs/settings.py +++ b/eatslugs/settings.py @@ -69,12 +69,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 * -- 2.30.2 From 288f5f54203a7dba7a604a07b98a69caba74e667 Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Thu, 13 Jun 2019 14:03:39 +0100 Subject: [PATCH 3/3] settings fixes --- eatslugs/settings.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/eatslugs/settings.py b/eatslugs/settings.py index 1eec832..84c9b90 100644 --- a/eatslugs/settings.py +++ b/eatslugs/settings.py @@ -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.Loader', - 'django.template.loaders.app_directories.Loader', -) - 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', -- 2.30.2