Ticket #7922: 7922.diff
File 7922.diff, 1.6 KB (added by , 16 years ago) |
---|
-
tests/regressiontests/admin_autodiscover/admin.py
1 raise ImportError('From inside admin.py') -
tests/regressiontests/admin_autodiscover/tests.py
1 r""" 2 >>> from django.contrib import admin 3 >>> admin.autodiscover() 4 Traceback (most recent call last): 5 ... 6 ImportError: From inside admin.py 7 """ -
django/contrib/admin/__init__.py
8 8 not present. This forces an import on them to register any admin bits they 9 9 may want. 10 10 """ 11 from sys import exc_info 12 from traceback import extract_tb 11 13 from django.conf import settings 12 14 for app in settings.INSTALLED_APPS: 13 15 try: 14 16 __import__("%s.admin" % app) 15 17 except ImportError: 16 pass 18 exc = exc_info() 19 if len(extract_tb(exc[-1], 2)) > 1: 20 raise