From 0a7300476995e17c9560d04ddbe463ee39a10b04 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 11 Apr 2006 02:47:37 +0000 Subject: [PATCH] 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 --- django/contrib/admin/views/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index 0713b65e48..96f30e7c5b 100644 --- a/django/contrib/admin/views/main.py +++ b/django/contrib/admin/views/main.py @@ -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.