Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pole-Web
Website
Commits
c6c2cfaa
Commit
c6c2cfaa
authored
Apr 07, 2022
by
MOREAU Ulysse
Committed by
VAN ZUIJLEN Nils
Sep 04, 2022
Browse files
Order middlewares correctly
parent
7050ed13
Changes
2
Hide whitespace changes
Inline
Side-by-side
notifications/middleware.py
View file @
c6c2cfaa
...
...
@@ -10,7 +10,7 @@ class ReadOnVisit(MiddlewareMixin):
# Do not mark notification as read
# if the visiting user is an admin
# impersonating a user.
if
getattr
(
request
.
user
,
"
is_impersonate
"
,
False
)
:
if
request
.
user
.
is_impersonate
:
return
notifications
=
models
.
Notification
.
objects
.
filter
(
...
...
site_des_eleves/settings.py
View file @
c6c2cfaa
...
...
@@ -68,8 +68,8 @@ MIDDLEWARE = (
"django.contrib.messages.middleware.MessageMiddleware"
,
"django.middleware.clickjacking.XFrameOptionsMiddleware"
,
"django.middleware.security.SecurityMiddleware"
,
"notifications.middleware.ReadOnVisit"
,
"impersonate.middleware.ImpersonateMiddleware"
,
"notifications.middleware.ReadOnVisit"
,
)
ROOT_URLCONF
=
"site_des_eleves.urls"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment