From 18759b2209ff556aed7f20d83cbf23e3d234e41c Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Mon, 25 May 2020 16:41:24 +0200 Subject: Fixed #31616 -- Added hint about middleware ordering for SessionMiddleware admin check. --- tests/admin_checks/tests.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py index 52f2188c9f..5744dc1b39 100644 --- a/tests/admin_checks/tests.py +++ b/tests/admin_checks/tests.py @@ -214,6 +214,12 @@ class SystemChecksTestCase(SimpleTestCase): checks.Error( "'django.contrib.sessions.middleware.SessionMiddleware' " "must be in MIDDLEWARE in order to use the admin application.", + hint=( + "Insert " + "'django.contrib.sessions.middleware.SessionMiddleware' " + "before " + "'django.contrib.auth.middleware.AuthenticationMiddleware'." + ), id='admin.E410', ), ] -- cgit v1.3