'patchwork',
]
-MIDDLEWARE_CLASSES = [
+_MIDDLEWARE_CLASSES = [
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
]
if django.VERSION >= (1, 7):
- MIDDLEWARE_CLASSES += [
+ _MIDDLEWARE_CLASSES += [
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
]
if django.VERSION >= (1, 7):
- MIDDLEWARE_CLASSES += [
+ _MIDDLEWARE_CLASSES += [
'django.contrib.admindocs.middleware.XViewMiddleware'
]
else:
- MIDDLEWARE_CLASSES += ['django.middleware.doc.XViewMiddleware']
+ _MIDDLEWARE_CLASSES += ['django.middleware.doc.XViewMiddleware']
+
+if django.VERSION >= (1, 10):
+ MIDDLEWARE = _MIDDLEWARE_CLASSES
+else:
+ MIDDLEWARE_CLASSES = _MIDDLEWARE_CLASSES
TIME_ZONE = 'Australia/Canberra'
DEBUG_TOOLBAR_PATCH_SETTINGS = False
# This should go first in the middleware classes
- MIDDLEWARE_CLASSES = [
- 'debug_toolbar.middleware.DebugToolbarMiddleware',
- ] + MIDDLEWARE_CLASSES
+ if django.VERSION >= (1, 10):
+ MIDDLEWARE = [
+ 'debug_toolbar.middleware.DebugToolbarMiddleware',
+ ] + MIDDLEWARE
+ else:
+ MIDDLEWARE_CLASSES = [
+ 'debug_toolbar.middleware.DebugToolbarMiddleware',
+ ] + MIDDLEWARE_CLASSES
INTERNAL_IPS = [
'127.0.0.1', '::1',