Skip to content

Commit

Permalink
Updated settings to remove all the TEMPLATE_* settings and put them i…
Browse files Browse the repository at this point in the history
…nto the TEMPLATES dict for Django 1.9 compatibility.
  • Loading branch information
epicserve committed Feb 15, 2016
1 parent 6f813fd commit dfc277f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions example/settings-testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
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'),
Expand Down Expand Up @@ -66,11 +65,6 @@

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',
Expand All @@ -81,9 +75,16 @@

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'

0 comments on commit dfc277f

Please sign in to comment.