From f95babce51f97887203530a4a79722ee95f6447b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pi=C3=A9tri?= Date: Thu, 18 Feb 2021 16:10:53 +0100 Subject: [PATCH] fix: :bug: Quick fix bug with MIDDLEWARE_CLASSES Support for django 2.22 introduces the use of MIDDLEWARE instead of MIDDLEWARE_CLASSES. This change was not reflected everywhere, about function for instance. --- re2o/settings.py | 4 ++-- re2o/views.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/re2o/settings.py b/re2o/settings.py index c298b9f8..cf2b9c3e 100644 --- a/re2o/settings.py +++ b/re2o/settings.py @@ -111,9 +111,9 @@ AUTHENTICATION_BACKENDS = ["re2o.login.RecryptBackend"] # Include debug_toolbar middleware if activated if "debug_toolbar" in INSTALLED_APPS: # Include this middleware at the beggining - MIDDLEWARE_CLASSES = ( + MIDDLEWARE = ( "debug_toolbar.middleware.DebugToolbarMiddleware", - ) + MIDDLEWARE_CLASSES + ) + MIDDLEWARE # Change the default show_toolbar middleware DEBUG_TOOLBAR_CONFIG = { "SHOW_TOOLBAR_CALLBACK": "re2o.middleware.show_debug_toolbar" diff --git a/re2o/views.py b/re2o/views.py index 07f55253..8853b9d4 100644 --- a/re2o/views.py +++ b/re2o/views.py @@ -109,7 +109,7 @@ def about_page(request): git_info_commit = NO_GIT_MSG git_info_commit_date = NO_GIT_MSG - dependencies = settings.INSTALLED_APPS + settings.MIDDLEWARE_CLASSES + dependencies = settings.INSTALLED_APPS + settings.MIDDLEWARE try: president = Mandate.get_mandate().president.get_full_name()