Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 2.2 fails to load with user_sessions #91

Open
dwasyl opened this issue Apr 3, 2019 · 7 comments
Open

Django 2.2 fails to load with user_sessions #91

dwasyl opened this issue Apr 3, 2019 · 7 comments

Comments

@dwasyl
Copy link

dwasyl commented Apr 3, 2019

When loading with Django 2.2, Django returns an error stating 'django.contrib.sessions' must be in INSTALLED_APPS in order to use the admin application.

I'm not sure if the session app registration has changed with the latest Django, but this wasn't an issue with 2.1.x.

@kezabelle
Copy link

Related upstream ticket, FWIW.

@Lionqueen94
Copy link

Lionqueen94 commented May 2, 2019

On Django 2.2 with adding django.contrib.sessions app to INSTALLED APPS, user sessions still worked and everything was fine.
Now in Django 2.2.1 they require the SessionMiddleware from django which apparently does not work properly with user sessions middleware, because I cannot login a user anymore from the backend.
I do not know if there is something wrong in user sessions or in Django now, but I hope someone can shed some light on this please. Thanks in advance!
See my response to the upstream ticket

@akx
Copy link

akx commented May 2, 2019

The fix in django-user-sessions is to simply derive DUS's middleware from the built-in middleware instead of just MiddlewareMixin.

For a quick workaround before that's implemented, as per my reply in django/django#11166 (comment) , one can do this in application code:

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

lukegb added a commit to SpongePowered/SpongeAuth that referenced this issue Dec 18, 2019
lukegb added a commit to SpongePowered/SpongeAuth that referenced this issue Dec 18, 2019
lukegb added a commit to SpongePowered/SpongeAuth that referenced this issue Dec 18, 2019
@Bouke
Copy link
Collaborator

Bouke commented Jan 19, 2020

I've had success with specifying the following setting, does that work for you?

SILENCED_SYSTEM_CHECKS = ['admin.E410']

@Kailegh
Copy link

Kailegh commented Feb 26, 2020

I am facing this issue right know, but i do not think that doing
SILENCED_SYSTEM_CHECKS = ['admin.E410']
is the best way to solve it, is there any other way ? because pip install django-user-sessions is still giving this error on django 2.2.3

@pmhoudry
Copy link

in 2.2.11 the issue is gone.

@franciscojavierarceo
Copy link

I'm still seeing this issue in 2.2.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants