summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-11-17 22:49:01 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-11-17 22:49:01 +0100
commit4b9eb7602d6d8756933d1a767004155a263cc150 (patch)
tree788629e5c4ad5056703e3a6ae6c6927525e38373
parenta37f4525133f97dcdca06c51476a60785b82007d (diff)
Normalized check that ALLOWED_INCLUDE_ROOTS is a tuple.
-rw-r--r--django/conf/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/django/conf/__init__.py b/django/conf/__init__.py
index 695cbb9e7f..1ac308a3ed 100644
--- a/django/conf/__init__.py
+++ b/django/conf/__init__.py
@@ -74,9 +74,6 @@ class BaseSettings(object):
def __setattr__(self, name, value):
if name in ("MEDIA_URL", "STATIC_URL") and value and not value.endswith('/'):
raise ImproperlyConfigured("If set, %s must end with a slash" % name)
- elif name == "ALLOWED_INCLUDE_ROOTS" and isinstance(value, six.string_types):
- raise ValueError("The ALLOWED_INCLUDE_ROOTS setting must be set "
- "to a tuple, not a string.")
object.__setattr__(self, name, value)
@@ -92,7 +89,12 @@ class Settings(BaseSettings):
mod = importlib.import_module(self.SETTINGS_MODULE)
- tuple_settings = ("INSTALLED_APPS", "TEMPLATE_DIRS", "LOCALE_PATHS")
+ tuple_settings = (
+ "ALLOWED_INCLUDE_ROOTS",
+ "INSTALLED_APPS",
+ "TEMPLATE_DIRS",
+ "LOCALE_PATHS",
+ )
self._explicit_settings = set()
for setting in dir(mod):
if setting.isupper():