1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

magic-removal: Improved admin app to check for django.core.context_processors.auth in the TEMPLATE_CONTEXT_PROCESSORS setting and raise ImproperlyConfigured if it's not in there

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2658 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-04-11 02:47:37 +00:00
parent 180efa66ea
commit 0a73004769

View File

@ -19,7 +19,10 @@ import operator
from django.contrib.admin.models import LogEntry, ADDITION, CHANGE, DELETION
if not LogEntry._meta.installed:
raise ImproperlyConfigured, "You'll need to put 'django.contrib.admin' in INSTALLED_APPS before you can use the admin application."
raise ImproperlyConfigured, "You'll need to put 'django.contrib.admin' in your INSTALLED_APPS setting before you can use the admin application."
if 'django.core.context_processors.auth' not in settings.TEMPLATE_CONTEXT_PROCESSORS:
raise ImproperlyConfigured, "You'll need to put 'django.core.context_processors.auth' in your TEMPLATE_CONTEXT_PROCESSORS setting before you can use the admin application."
# The system will display a "Show all" link on the change list only if the
# total result count is less than or equal to this setting.