Ticket #11667: django_11667_manage_test.diff

File django_11667_manage_test.diff, 902 bytes (added by Allen Riddell, 14 years ago)

patch for #comment:4

  • django/db/models/loading.py

    diff --git a/django/db/models/loading.py b/django/db/models/loading.py
    index e07aab4..64a0e8f 100644
    a b class AppCache(object):  
    7272        self.nesting_level += 1
    7373        try:
    7474            models = import_module('.models', app_name)
    75         except ImportError:
     75        except ImportError, e:
    7676            self.nesting_level -= 1
    7777            if can_postpone:
    7878                # Either the app has no models, or the package is still being
    class AppCache(object):  
    8080                # We will check again once all the recursion has finished (in
    8181                # populate).
    8282                self.postponed.append(app_name)
     83            if str(e).startswith("cannot import name"):
     84                raise
    8385            return None
    8486        self.nesting_level -= 1
    8587        if models not in self.app_store:
Back to Top