From f6e7b3f2ff8bb47d5f5f297a203917a8791c2b2d Mon Sep 17 00:00:00 2001 From: Brent O'Connor Date: Mon, 14 Mar 2016 19:46:25 -0500 Subject: [PATCH] Moved all template settings for the example app into the TEMPLATES Django setting --- example/settings.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/example/settings.py b/example/settings.py index 8e5aa31..7940187 100644 --- a/example/settings.py +++ b/example/settings.py @@ -7,7 +7,6 @@ APP = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) PROJ_ROOT = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, APP) DEBUG = True -TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), @@ -66,11 +65,6 @@ STATICFILES_FINDERS = ( SECRET_KEY = 'bwq#m)-zsey-fs)0#4*o=2z(v5g!ei=zytl9t-1hesh4b&-u^d' -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', -) - MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', @@ -81,10 +75,25 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'urls' -TEMPLATE_DIRS = ( - os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates')), -) - +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': True, + 'DIRS': [os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates'))], + 'OPTIONS': { + 'debug': DEBUG, + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + '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', + ], + } + } +] CATEGORIES_SETTINGS = { 'ALLOW_SLUG_CHANGE': True,