use new MIDDLEWARE setting (since Django 1.10)

MIDDLEWARE_CLASSES was removed in Django 2.0.
This commit is contained in:
Thomas Waldmann 2018-10-19 23:37:29 +02:00
parent 9a6772b74a
commit 6ecee32398
2 changed files with 3 additions and 3 deletions

View File

@ -156,7 +156,7 @@ TEMPLATES = [
}, },
] ]
MIDDLEWARE_CLASSES = ( MIDDLEWARE = (
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware', 'django.middleware.locale.LocaleMiddleware',

View File

@ -19,9 +19,9 @@ WWW_IPV6_HOST = 'ip6-localhost:8000'
# ALLOWED_HOSTS is not needed here, as DEBUG is True # ALLOWED_HOSTS is not needed here, as DEBUG is True
MIDDLEWARE_CLASSES = ( MIDDLEWARE = (
'debug_toolbar.middleware.DebugToolbarMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware',
) + MIDDLEWARE_CLASSES ) + MIDDLEWARE
INTERNAL_IPS = ['127.0.0.1', '::1', ] # needed for DebugToolbar! INTERNAL_IPS = ['127.0.0.1', '::1', ] # needed for DebugToolbar!
DEBUG_TOOLBAR_PATCH_SETTINGS = False DEBUG_TOOLBAR_PATCH_SETTINGS = False