Kaydet (Commit) f3a9c719 authored tarafından Jannis Leidel's avatar Jannis Leidel

Added check to the staticfiles app to make sure the STATIC_ROOT setting isn't…

Added check to the staticfiles app to make sure the STATIC_ROOT setting isn't accidentally added to the STATICFILES_DIRS setting. Thanks for the suggestion, SmileyChris and harijay.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15376 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 6361a242
......@@ -45,3 +45,10 @@ def check_settings():
(settings.MEDIA_ROOT == settings.STATIC_ROOT)):
raise ImproperlyConfigured("The MEDIA_ROOT and STATIC_ROOT "
"settings must have different values")
for path in settings.STATICFILES_DIRS:
# in case the item contains a prefix
if isinstance(path, (list, tuple)):
path = path[1]
if os.path.abspath(settings.STATIC_ROOT) == os.path.abspath(path):
raise ImproperlyConfigured("The STATICFILES_DIRS setting should "
"not contain the STATIC_ROOT setting")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment