mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Normalized check that ALLOWED_INCLUDE_ROOTS is a tuple.
This commit is contained in:
parent
a37f452513
commit
4b9eb7602d
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user