diff --git a/django/contrib/admin/__init__.py b/django/contrib/admin/__init__.py
index 704dc58..86589a5 100644
a
|
b
|
from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
|
2 | 2 | from django.contrib.admin.options import StackedInline, TabularInline |
3 | 3 | from django.contrib.admin.sites import AdminSite, site |
4 | 4 | |
| 5 | valid_apps_admin = [] |
| 6 | |
5 | 7 | def autodiscover(): |
6 | 8 | """ |
7 | 9 | Auto-discover INSTALLED_APPS admin.py modules and fail silently when |
… |
… |
def autodiscover():
|
10 | 12 | """ |
11 | 13 | import imp |
12 | 14 | from django.conf import settings |
13 | | for app in settings.INSTALLED_APPS: |
| 15 | for app in settings.INSTALLED_APPS and app not in valid_apps_admin: |
14 | 16 | try: |
15 | 17 | imp.find_module("admin", __import__(app, {}, {}, [app.split(".")[-1]]).__path__) |
16 | 18 | except ImportError: |
17 | 19 | # there is no app admin.py, skip it |
18 | 20 | continue |
19 | | __import__("%s.admin" % app) |
| 21 | try: |
| 22 | __import__("%s.admin" % app) |
| 23 | except: |
| 24 | raise |
| 25 | else: |
| 26 | valid_apps_admin.append(app) |