Author: arthurk
Date: 2010-09-10 17:44:44 -0500 (Fri, 10 Sep 2010)
New Revision: 13729
Modified:
django/branches/soc2010/app-loading/django/core/management/__init__.py
Log:
[soc2010/app-loading] initialize cache and check for errors when setting up the
environment
Modified: django/branches/soc2010/app-loading/django/core/management/__init__.py
===================================================================
--- django/branches/soc2010/app-loading/django/core/management/__init__.py
2010-09-10 22:37:17 UTC (rev 13728)
+++ django/branches/soc2010/app-loading/django/core/management/__init__.py
2010-09-10 22:44:44 UTC (rev 13729)
@@ -97,8 +97,8 @@
# Find the installed apps
try:
- from django.conf import settings
- apps = settings.INSTALLED_APPS
+ from django.core.apps import cache
+ apps = cache.installed_apps
except (AttributeError, EnvironmentError, ImportError):
apps = []
@@ -419,6 +419,12 @@
project_module = import_module(project_name)
sys.path.pop()
+ # Initialize the appcache and look for errors
+ from django.core.apps import cache
+ for (app_name, error) in cache.get_app_errors().items():
+ sys.stderr.write("%s: %s" % (app_name, error))
+ sys.exit(1)
+
return project_directory
def execute_from_command_line(argv=None):
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.