Browse files

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.
  • Loading branch information...
1 parent 55c585f commit 40ca99097f34b2180b2afe6d0056cade4c732618 @claudep claudep committed Feb 4, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/core/management/
@@ -107,10 +107,13 @@ def get_commands():
from django.conf import settings
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:

0 comments on commit 40ca990

Please sign in to comment.