﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30312	Admin app has too hard a dependency on sessions app	Aarni Koskela	Aarni Koskela	"Since #29695 (371ece2f0682e51f2f796854d3e091827a7cea63), released in 2.2, the admin app checks whether the `django.contrib.sessions` app is in `INSTALLED_APPS`.

Some projects may have opted to use a replacement session management app such as https://github.com/QueraTeam/django-qsessions – the admin app claims to be incompatible with such a configuration, even if it actually means ""I'm going to need _some_ session management that works like `django.contrib.sessions`"".

Maybe it would be better to get rid of the app check and do what's being done for various middleware in the checks function anyway, e.g. something like

{{{
if not _contains_subclass('django.contrib.sessions.middleware.SessionMiddleware', settings.MIDDLEWARE):
    errors.append(checks.Error(
        ""'django.contrib.sessions.middleware.SessionMiddleware' must ""
        ""be in MIDDLEWARE in order to use the admin application."",
        id='admin.E4XX',
    ))
}}}

– this would be out-of-the-box compatible with e.g. Qsessions.

The obvious workaround is to just re-add `django.contrib.sessions` back into `INSTALLED_APPS` which kinda works, but has the mild but unfortunate side effect of forcibly enabling the `django.contrib.sessions.models.Session` model and migrations, (re-)adding a useless `django_session` table into the database upon migration. "	Bug	closed	contrib.admin	2.2	Release blocker	fixed			Ready for checkin	1	0	0	0	0	0
