Ticket #12360: load_app-importerror.patch
File load_app-importerror.patch, 722 bytes (added by , 15 years ago) |
---|
-
django/db/models/loading.py
70 70 """ 71 71 self.handled[app_name] = None 72 72 self.nesting_level += 1 73 try: 74 models = import_module('.models', app_name) 75 except ImportError: 73 app_module = __import__(app_name, {}, {}, ["models"]) 74 if hasattr(app_module, "models"): 75 models = getattr(app_module, "models") 76 else: 76 77 self.nesting_level -= 1 77 78 if can_postpone: 78 79 # Either the app has no models, or the package is still being