From 6ecee32398403632e8bad0223e13ff6bbcdba8d7 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 19 Oct 2018 23:37:29 +0200 Subject: [PATCH] use new MIDDLEWARE setting (since Django 1.10) MIDDLEWARE_CLASSES was removed in Django 2.0. --- nsupdate/settings/base.py | 2 +- nsupdate/settings/dev.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nsupdate/settings/base.py b/nsupdate/settings/base.py index b4576b2..1da50c9 100644 --- a/nsupdate/settings/base.py +++ b/nsupdate/settings/base.py @@ -156,7 +156,7 @@ TEMPLATES = [ }, ] -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', diff --git a/nsupdate/settings/dev.py b/nsupdate/settings/dev.py index 7d8c11f..19d236b 100644 --- a/nsupdate/settings/dev.py +++ b/nsupdate/settings/dev.py @@ -19,9 +19,9 @@ WWW_IPV6_HOST = 'ip6-localhost:8000' # ALLOWED_HOSTS is not needed here, as DEBUG is True -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'debug_toolbar.middleware.DebugToolbarMiddleware', -) + MIDDLEWARE_CLASSES +) + MIDDLEWARE INTERNAL_IPS = ['127.0.0.1', '::1', ] # needed for DebugToolbar! DEBUG_TOOLBAR_PATCH_SETTINGS = False