diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-02-04 11:47:59 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-02-04 11:47:59 +0100 |
| commit | 40ca99097f34b2180b2afe6d0056cade4c732618 (patch) | |
| tree | dae5ebc7327575905c8859bfb6a4bc9ac43efe0b | |
| parent | 55c585f1c7a9c91308193f0648caf36203174564 (diff) | |
Fixed #19724 -- Output error when settings are improperly configured
...during retrieval of available management commands.
Thanks Peter Davis for the report and Julien Phalip for the review.
| -rw-r--r-- | django/core/management/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index 7638937c94..c68ffea43c 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -107,10 +107,13 @@ def get_commands(): from django.conf import settings try: apps = settings.INSTALLED_APPS - except ImproperlyConfigured: + except ImproperlyConfigured as e: # Still useful for commands that do not require functional settings, # like startproject or help apps = [] + sys.stderr.write(color_style().ERROR( + "Project settings contain errors: %s\n" + "As a result, only the core Django commands are available.\n" % e)) # Find and load the management module for each installed app. for app_name in apps: |
