Skip to content

Commit

Permalink
Add the UserSessionsMiddleware.
Browse files Browse the repository at this point in the history
This is a workaround for jazzband/django-user-sessions#91.
  • Loading branch information
lukegb committed Dec 18, 2019
1 parent b55df3f commit 21a8f2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spongeauth/spongeauth/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
MIDDLEWARE = [
"core.middleware.XRealIPMiddleware",
"django.middleware.security.SecurityMiddleware",
"user_sessions.middleware.SessionMiddleware",
"sso.middleware.UserSessionsMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
Expand Down
7 changes: 7 additions & 0 deletions spongeauth/sso/middleware.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import django.contrib.sessions.middleware
import user_sessions.middleware

class UserSessionsMiddleware(
user_sessions.middleware.SessionMiddleware,
django.contrib.sessions.middleware.SessionMiddleware):
pass

0 comments on commit 21a8f2f

Please sign in to comment.