1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #18545 -- Make the 'no DJANGO_SETTINGS_MODULE' error message more useful.Thanks Nick Coghlan for the report, and Malcolm Tredinnick for review.

This commit is contained in:
Carl Meyer
2012-09-08 14:12:18 -06:00
parent c26dd4f154
commit 307706d082
3 changed files with 34 additions and 24 deletions

View File

@@ -5,6 +5,7 @@ from optparse import OptionParser, NO_DEFAULT
import imp
import warnings
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import BaseCommand, CommandError, handle_default_options
from django.core.management.color import color_style
from django.utils.importlib import import_module
@@ -105,7 +106,7 @@ def get_commands():
try:
from django.conf import settings
apps = settings.INSTALLED_APPS
except (AttributeError, EnvironmentError, ImportError):
except (AttributeError, ImproperlyConfigured):
apps = []
# Find and load the management module for each installed app.