Fixed #31575 -- Added system check for admin sidebar request context processor dependency.

Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
This commit is contained in:
Jon Dufresne 2020-05-14 10:27:35 +02:00 committed by Mariusz Felisiak
parent e341bed606
commit d522b51c40
7 changed files with 52 additions and 3 deletions

View file

@ -134,6 +134,12 @@ class SystemChecksTestCase(SimpleTestCase):
"be enabled in DjangoTemplates (TEMPLATES) in order to use "
"the admin application.",
id='admin.E404',
),
checks.Warning(
"'django.template.context_processors.request' must be enabled "
"in DjangoTemplates (TEMPLATES) in order to use the admin "
"navigation sidebar.",
id='admin.W411',
)
]
self.assertEqual(admin.checks.check_dependencies(), expected)
@ -150,7 +156,10 @@ class SystemChecksTestCase(SimpleTestCase):
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': ['django.contrib.messages.context_processors.messages'],
'context_processors': [
'django.template.context_processors.request',
'django.contrib.messages.context_processors.messages',
],
},
}],
)
@ -177,6 +186,7 @@ class SystemChecksTestCase(SimpleTestCase):
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],