From c1a64fc08f7e21c5c0933f09c665ff5a25dd8868 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 17 Oct 2020 14:46:23 +0100 Subject: replaced all LoginRequiredMixin and decorators with custom middleware --- config/settings/gcloud_settings.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config/settings') diff --git a/config/settings/gcloud_settings.py b/config/settings/gcloud_settings.py index 3a8912f..a057db8 100644 --- a/config/settings/gcloud_settings.py +++ b/config/settings/gcloud_settings.py @@ -169,12 +169,17 @@ MIDDLEWARE = [ 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'config.middleware.LoginRequiredMiddleware' ] ROOT_URLCONF = 'config.urls' WSGI_APPLICATION = 'config.wsgi.application' +LOGIN_EXEMPT_URLS = ( + r"account/login", + r"account/logout" +) # Database # https://docs.djangoproject.com/en/2.1/ref/settings/#databases -- cgit v1.2.3