diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2010-01-10 18:56:53 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2010-01-10 18:56:53 +0000 |
| commit | 31eb0fbe3d16418cafd907e333207431dc49cdd0 (patch) | |
| tree | 549d4ba9b01fd5629325dacf4a55c56f886e9a56 /django/contrib/admin/__init__.py | |
| parent | 5bcaa45d331b4a9201103360770261deb82f15ae (diff) | |
Fixed #10887 -- Fixed a possible gotcha in admin.autodiscover() by moving import_module() outside the try/except. Thanks, lsaffre
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/admin/__init__.py')
| -rw-r--r-- | django/contrib/admin/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/admin/__init__.py b/django/contrib/admin/__init__.py index 8105976591..abc5f09b56 100644 --- a/django/contrib/admin/__init__.py +++ b/django/contrib/admin/__init__.py @@ -37,8 +37,9 @@ def autodiscover(): # should) bubble up, but a missing __path__ (which is legal, but weird) # fails silently -- apps that do weird things with __path__ might # need to roll their own admin registration. + mod = import_module(app) try: - app_path = import_module(app).__path__ + app_path = mod.__path__ except AttributeError: continue |
