Code

Ticket #10887: 10887.diff

File 10887.diff, 635 bytes (added by SmileyChris, 5 years ago)
Line 
1Index: django/contrib/admin/__init__.py
2===================================================================
3--- django/contrib/admin/__init__.py    (revision 10838)
4+++ django/contrib/admin/__init__.py    (working copy)
5@@ -37,8 +37,9 @@
6         # should) bubble up, but a missing __path__ (which is legal, but weird)
7         # fails silently -- apps that do weird things with __path__ might
8         # need to roll their own admin registration.
9+        mod = import_module(app)
10         try:
11-            app_path = import_module(app).__path__
12+            app_path = mod.__path__
13         except AttributeError:
14             continue
15