Skip to content

Django 2.2 fails to load with user_sessions #91

Open

Description

@dwasyl

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.

Activity

  1. kezabelle commented on Apr 15, 2019

    @kezabelle
  2. Lionqueen94 commented on May 2, 2019

    @Lionqueen94

    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

  3. akx commented on May 2, 2019

    @akx

    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
  4. Bouke commented on Jan 19, 2020

    @Bouke
    Collaborator

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

    SILENCED_SYSTEM_CHECKS = ['admin.E410']
    
  5. Kailegh commented on Feb 26, 2020

    @Kailegh

    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

  6. pmhoudry commented on Mar 13, 2020

    @pmhoudry

    in 2.2.11 the issue is gone.

  7. franciscojavierarceo commented on Jun 21, 2020

    @franciscojavierarceo

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions