From 785d6360cd97175da954decb1fad26a0098ce7a5 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 6 Apr 2021 22:50:57 +0100 Subject: Now compat with Dj2.0.13 & 1.11.29 --- settings.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'settings.py') diff --git a/settings.py b/settings.py index 15f139f..a8bff2e 100644 --- a/settings.py +++ b/settings.py @@ -127,7 +127,9 @@ INSTALLED_APPS = ( ) # See the recommended order of these in https://docs.djangoproject.com/en/2.2/ref/middleware/ -MIDDLEWARE_CLASSES = ( +# Note that tis is a radically different onion architecture though it looks the same, +# see https://docs.djangoproject.com/en/2.0/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware +MIDDLEWARE = [ #'django.middleware.security.SecurityMiddleware', # SECURE_SSL_REDIRECT and SECURE_SSL_HOST # we don't use this 'django.middleware.gzip.GZipMiddleware', # not needed when expofiles and photos served by apache 'django.contrib.sessions.middleware.SessionMiddleware', # Manages sessions, if CSRF_USE_SESSIONS then it needs to be early @@ -137,8 +139,8 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.admindocs.middleware.XViewMiddleware', # this and docutils needed by admindocs 'django.contrib.messages.middleware.MessageMiddleware', # Cookie-based and session-based message support. Needed by admin system 'django.middleware.clickjacking.XFrameOptionsMiddleware', # clickjacking protection via the X-Frame-Options header - 'troggle.middleware.SmartAppendSlashMiddleware' # doesn't seem to be working... -) + #'troggle.middleware.SmartAppendSlashMiddleware' # needs adapting after Dj2.0 +] ROOT_URLCONF = 'troggle.urls' -- cgit v1.2.3