Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Report wrongly-typed settings and abort, as originally planned.

Thanks Claude for the heads up. Refs #12493 and commit 5e08b79.
  • Loading branch information...
commit 64cdea68e71829905da6374a066d1700375255ec 1 parent 5e3a653
@ramiro ramiro authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 django/conf/__init__.py
View
8 django/conf/__init__.py
@@ -132,9 +132,17 @@ def __init__(self, settings_module):
% (self.SETTINGS_MODULE, e)
)
+ tuple_settings = ("INSTALLED_APPS", "TEMPLATE_DIRS")
+
for setting in dir(mod):
if setting == setting.upper():
setting_value = getattr(mod, setting)
+
+ if setting in tuple_settings and \
+ isinstance(setting_value, six.string_types):
+ raise ImproperlyConfigured("The %s setting must be a tuple. "
+ "Please fix your settings." % setting)
+
setattr(self, setting, setting_value)
if not self.SECRET_KEY:

0 comments on commit 64cdea6

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