From dfc277f08a2664dd6c9d568f42feaa9042a5679e Mon Sep 17 00:00:00 2001 From: Brent O'Connor Date: Mon, 15 Feb 2016 11:52:33 -0600 Subject: [PATCH] Updated settings to remove all the TEMPLATE_* settings and put them into the TEMPLATES dict for Django 1.9 compatibility. --- example/settings-testing.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/example/settings-testing.py b/example/settings-testing.py index db71853..d375b93 100644 --- a/example/settings-testing.py +++ b/example/settings-testing.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,9 +75,16 @@ 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, + } + }, +] if django.VERSION[1] > 5: TEST_RUNNER = 'django.test.runner.DiscoverRunner'