Fixed #31616 -- Added hint about middleware ordering for SessionMiddleware admin check.
This commit is contained in:
parent
f24b59267b
commit
18759b2209
|
@ -132,6 +132,12 @@ def check_dependencies(**kwargs):
|
||||||
errors.append(checks.Error(
|
errors.append(checks.Error(
|
||||||
"'django.contrib.sessions.middleware.SessionMiddleware' must "
|
"'django.contrib.sessions.middleware.SessionMiddleware' must "
|
||||||
"be in MIDDLEWARE in order to use the admin application.",
|
"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',
|
id='admin.E410',
|
||||||
))
|
))
|
||||||
return errors
|
return errors
|
||||||
|
|
|
@ -214,6 +214,12 @@ class SystemChecksTestCase(SimpleTestCase):
|
||||||
checks.Error(
|
checks.Error(
|
||||||
"'django.contrib.sessions.middleware.SessionMiddleware' "
|
"'django.contrib.sessions.middleware.SessionMiddleware' "
|
||||||
"must be in MIDDLEWARE in order to use the admin application.",
|
"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',
|
id='admin.E410',
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue