diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-05-27 01:08:18 -0700 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-05-27 01:08:18 -0700 |
| commit | 1a4b43521883ce85dfbda29b89822a59ffc5220b (patch) | |
| tree | 67a230f9a034d8498d9bb414e25915242b9688df | |
| parent | 0fa8d43e742ee8b480d938a47836b5a3720c2677 (diff) | |
| parent | 9a524e3c5bd8fafd4996a6f1486de8a2cbb052a2 (diff) | |
Merge pull request #1217 from erikr/better-settings-errors2
Fixed #20443 -- Import errors in settings cause confusing error messages
| -rw-r--r-- | django/conf/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/conf/__init__.py b/django/conf/__init__.py index f876c490c8..61584391cd 100644 --- a/django/conf/__init__.py +++ b/django/conf/__init__.py @@ -127,7 +127,10 @@ class Settings(BaseSettings): try: mod = importlib.import_module(self.SETTINGS_MODULE) except ImportError as e: - raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e)) + raise ImportError( + "Could not import settings '%s' (Is it on sys.path? Is there an import error in the settings file?): %s" + % (self.SETTINGS_MODULE, e) + ) # Settings that should be converted into tuples if they're mistakenly entered # as strings. |
