core: rename MIDDLEWARE_CLASSES into MIDDLEWARE

MIDDLEWARE_CLASSES is deprecated since django 1.11 and with last version of django-debug-toolbar it broke the dev server
See here for more details https://docs.djangoproject.com/fr/2.2/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware
This commit is contained in:
Antoine Bartuccio 2019-07-05 22:00:06 +02:00
parent f922ab9272
commit f500dec1f1
1 changed files with 2 additions and 4 deletions

View File

@ -95,7 +95,7 @@ INSTALLED_APPS = (
"matmat", "matmat",
) )
MIDDLEWARE_CLASSES = ( MIDDLEWARE = (
"django.contrib.sessions.middleware.SessionMiddleware", "django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware", "django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware", "django.middleware.csrf.CsrfViewMiddleware",
@ -564,9 +564,7 @@ except:
if DEBUG: if DEBUG:
INSTALLED_APPS += ("debug_toolbar",) INSTALLED_APPS += ("debug_toolbar",)
MIDDLEWARE_CLASSES = ( MIDDLEWARE = ("debug_toolbar.middleware.DebugToolbarMiddleware",) + MIDDLEWARE
"debug_toolbar.middleware.DebugToolbarMiddleware",
) + MIDDLEWARE_CLASSES
DEBUG_TOOLBAR_PANELS = [ DEBUG_TOOLBAR_PANELS = [
"debug_toolbar.panels.versions.VersionsPanel", "debug_toolbar.panels.versions.VersionsPanel",
"debug_toolbar.panels.timer.TimerPanel", "debug_toolbar.panels.timer.TimerPanel",