Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #20443 -- Import errors in settings cause confusing error messages

  • Loading branch information...
commit 9a524e3c5bd8fafd4996a6f1486de8a2cbb052a2 1 parent 31f6421
Erik Romijn authored May 25, 2013

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  django/conf/__init__.py
5  django/conf/__init__.py
@@ -127,7 +127,10 @@ def __init__(self, settings_module):
127 127
         try:
128 128
             mod = importlib.import_module(self.SETTINGS_MODULE)
129 129
         except ImportError as e:
130  
-            raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
  130
+            raise ImportError(
  131
+                "Could not import settings '%s' (Is it on sys.path? Is there an import error in the settings file?): %s"
  132
+                % (self.SETTINGS_MODULE, e)
  133
+            )
131 134
 
132 135
         # Settings that should be converted into tuples if they're mistakenly entered
133 136
         # as strings.

0 notes on commit 9a524e3

Please sign in to comment.
Something went wrong with that request. Please try again.