﻿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
31616	Add hint to the E410 about AuthenticationMiddleware.	Keryn Knight	Hasan Ramezani	"Given an empty `MIDDLEWARE` in your project, you try and run the admin.
The system checks framework kicks in, giving you:
{{{
(admin.E408) 'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application.
(admin.E409) 'django.contrib.messages.middleware.MessageMiddleware' must be in MIDDLEWARE in order to use the admin application.
(admin.E410) 'django.contrib.sessions.middleware.SessionMiddleware' must be in MIDDLEWARE in order to use the admin application.
}}}

You add each of those middlewares to the stack, and run the application:

{{{
File ""/path/to/django/contrib/auth/middleware.py"", line 23, in process_request
    ) % (""_CLASSES"" if settings.MIDDLEWARE is None else """")
AssertionError: The Django authentication middleware requires session middleware to be installed. Edit your MIDDLEWARE setting to insert 'django.contrib.sessions.middleware.SessionMiddleware' before 'django.contrib.auth.middleware.AuthenticationMiddleware'
}}}

Ignoring the fact that it ''should'' be a system check, and it's an unfortunate side-effect of spanning 2 separate contrib apps that it isn't, if the order of the errors output was updated, we'd not see this exception in this specific scenario."	Cleanup/optimization	closed	contrib.admin	dev	Normal	fixed			Accepted	1	0	0	0	1	0
