From 16ddb218418565d51393910f24c5d23b29d0ca16 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 11 Apr 2006 02:36:40 +0000 Subject: [PATCH] magic-removal: Changed admin view to check for LogEntry._meta.installed rather than ImportError, due to change in [2655] git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2656 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/views/main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index 72f4a47404..0713b65e48 100644 --- a/django/contrib/admin/views/main.py +++ b/django/contrib/admin/views/main.py @@ -17,10 +17,9 @@ from django.utils.html import escape from django.utils.text import capfirst, get_text_list import operator -try: - from django.contrib.admin.models import LogEntry, ADDITION, CHANGE, DELETION -except ImportError: - raise ImproperlyConfigured, "You don't have 'django.contrib.admin' in INSTALLED_APPS." +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." # 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.