summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Koziel <arthur@arthurkoziel.com>2010-08-06 13:35:15 +0000
committerArthur Koziel <arthur@arthurkoziel.com>2010-08-06 13:35:15 +0000
commit60c5f63d5a458fab1578e63069dad6fba8c968cc (patch)
tree838e9d5e211102143df18443e06e6f747f8c530c
parent6f4fc6012632adc1ca2e2dab3c045e882e72d560 (diff)
downloaddjango-60c5f63d5a458fab1578e63069dad6fba8c968cc.tar.gz
[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
-rw-r--r--django/core/apps.py3
-rw-r--r--django/db/models/loading.py9
2 files changed, 6 insertions, 6 deletions
diff --git a/django/core/apps.py b/django/core/apps.py
index 0b4e6924ba..a70ad68b06 100644
--- a/django/core/apps.py
+++ b/django/core/apps.py
@@ -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
diff --git a/django/db/models/loading.py b/django/db/models/loading.py
index f4ccf7bffe..20ebba633b 100644
--- a/django/db/models/loading.py
+++ b/django/db/models/loading.py
@@ -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):