Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #7922 -- admin.autodiscover() no longer eats ImportErrors for b…

…reakfast. Thanks Jan Rademaker and Alex Gaynor for their work on the ticket.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 525e1e379af20e53819b3b34b27380eb27ca0ac8 1 parent be17a80
@brosner brosner authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 django/contrib/admin/
7 django/contrib/admin/
@@ -8,9 +8,12 @@ def autodiscover():
not present. This forces an import on them to register any admin bits they
may want.
+ import imp
from django.conf import settings
for app in settings.INSTALLED_APPS:
- __import__("%s.admin" % app)
+ imp.find_module("admin", app.split("."))
except ImportError:
- pass
+ # there is no in app, skip it.
+ continue
+ __import__("%s.admin" % app)

0 comments on commit 525e1e3

Please sign in to comment.
Something went wrong with that request. Please try again.