1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

[soc2010/app-loading] removed app_errors attribute

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Arthur Koziel 2010-08-06 13:35:15 +00:00
parent 6f4fc60126
commit 60c5f63d5a
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,8 @@ class App(object):
if '.' in label:
label = label.split('.')[-1]
self.label = label
self.errors = {}
# errors raised when trying to import the app
self.errors = []
self.models = []
self.models_module = None

View File

@ -29,9 +29,6 @@ class AppCache(object):
# Mapping of app_labels to a dictionary of model names to model code.
app_models = SortedDict(),
# Mapping of app_labels to errors raised when trying to import the app.
app_errors = {},
# -- Everything below here is only used when populating the cache --
loaded = False,
handled = {},
@ -154,8 +151,10 @@ class AppCache(object):
def get_app_errors(self):
"Returns the map of known problems with the INSTALLED_APPS."
self._populate()
for app in app_instances:
self.app_errors.update(app.errors)
errors = {}
for app in self.app_instances:
if app.errors:
errors.update({app.label: app.errors})
return errors
def get_models(self, app_mod=None, include_auto_created=False, include_deferred=False):