From c12d2e01e8f136d818b007a791d771708ba65cb7 Mon Sep 17 00:00:00 2001 From: RajatGupta02 Date: Sun, 16 Apr 2023 04:09:40 +0530 Subject: [PATCH] admin path corrected --- app/yearbook/middleware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/yearbook/middleware.py b/app/yearbook/middleware.py index 38349f0..12bd56e 100644 --- a/app/yearbook/middleware.py +++ b/app/yearbook/middleware.py @@ -25,7 +25,7 @@ USER_MODEL = User # An array of path regexes that will not be processed by the middleware -PUBLIC_PATHS = ['^/public.*','^/$','^/static.*','^/admin$', '^/media.*'] +PUBLIC_PATHS = ['^/public.*','^/$','^/static.*','^/admin', '^/media.*'] # A dictionary of path regexes mapping to the roles. A user needs to have all roles in order to be authorized ROLES = { @@ -88,7 +88,7 @@ def __call__(self, request): # logging.info("line 88") return UNAUTHORIZED_HANDLER(request) self.assign_user(request, decoded['user']) - # logging.info("user assigned") + logging.info("user assigned") except Exception as err: # print(err)