Skip to content

Commit 212d675

Browse files
committed
Drop support for Django-1.9 and lower
1 parent 681c8bb commit 212d675

File tree

1 file changed

+18
-37
lines changed

1 file changed

+18
-37
lines changed

example/testapp/settings.py

Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -33,53 +33,34 @@
3333
# Example: "http://media.lawrence.com/static/"
3434
STATIC_URL = '/static/'
3535

36-
if django.VERSION[:2] < (1, 8):
37-
# List of callables that know how to import templates from various sources.
38-
TEMPLATE_LOADERS = (
39-
'django.template.loaders.filesystem.Loader',
40-
'django.template.loaders.app_directories.Loader',
41-
)
42-
43-
TEMPLATE_DIRS = (
44-
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
45-
# Always use forward slashes, even on Windows.
46-
# Don't forget to use absolute paths, not relative paths.
47-
)
48-
else:
49-
TEMPLATES = [
50-
{
51-
'BACKEND': 'django.template.backends.django.DjangoTemplates',
52-
'DIRS': [],
53-
'APP_DIRS': True,
54-
'OPTIONS': {
55-
'context_processors': [
56-
'django.template.context_processors.debug',
57-
'django.template.context_processors.request',
58-
'django.contrib.auth.context_processors.auth',
59-
'django.contrib.messages.context_processors.messages',
60-
],
61-
},
36+
TEMPLATES = [
37+
{
38+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
39+
'DIRS': [],
40+
'APP_DIRS': True,
41+
'OPTIONS': {
42+
'context_processors': [
43+
'django.template.context_processors.debug',
44+
'django.template.context_processors.request',
45+
'django.contrib.auth.context_processors.auth',
46+
'django.contrib.messages.context_processors.messages',
47+
],
6248
},
63-
]
49+
},
50+
]
6451

65-
INSTALLED_APPS = (
52+
INSTALLED_APPS = [
6653
'django.contrib.auth',
6754
'django.contrib.contenttypes',
6855
'django.contrib.sessions',
6956
'django.contrib.admin',
7057
'django.contrib.staticfiles',
7158
'adminsortable2',
7259
'testapp',
73-
)
60+
]
7461

75-
MIDDLEWARE = (
62+
MIDDLEWARE = [
7663
'django.contrib.sessions.middleware.SessionMiddleware',
7764
'django.contrib.auth.middleware.AuthenticationMiddleware',
7865
'django.contrib.messages.middleware.MessageMiddleware',
79-
)
80-
81-
MIDDLEWARE_CLASSES = MIDDLEWARE
82-
83-
# Explicitely set the test runner to the new 1.7 version, to silence obnoxious
84-
# 1_6.W001 check
85-
# TEST_RUNNER = 'django.test.runner.DiscoverRunner'
66+
]

0 commit comments

Comments
 (0)