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
This commit is contained in:
parent
5bcaa45d33
commit
31eb0fbe3d
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue