Ticket #9427: admin_autodiscover_impfix.patch
File admin_autodiscover_impfix.patch, 1.0 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/__init__.py
25 25 app_path = __import__(app, {}, {}, [app.split('.')[-1]]).__path__ 26 26 except AttributeError: 27 27 continue 28 29 # Step 2: use imp.find_module to find the app's admin.py. For some 30 # reason imp.find_module raises ImportError if the app can't be found 31 # but doesn't actually try to import the module. So skip this app if 32 # its admin.py doesn't exist 28 29 # Import the app's admin file. If this has errors we want them 30 # to bubble up. 33 31 try: 34 imp.find_module('admin', app_path)32 __import__("%s.admin" % app) 35 33 except ImportError: 36 34 continue 37 38 # Step 3: import the app's admin file. If this has errors we want them39 # to bubble up.40 __import__("%s.admin" % app)