From 4b9eb7602d6d8756933d1a767004155a263cc150 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 17 Nov 2014 22:49:01 +0100 Subject: [PATCH] Normalized check that ALLOWED_INCLUDE_ROOTS is a tuple. --- django/conf/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/django/conf/__init__.py b/django/conf/__init__.py index 695cbb9e7fc..1ac308a3ed7 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():