Convert STATICFILES_DIRS into a tuple if set as string
|Reported by:||Elmar Athmer||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If you mistakenly set STATICFILES_DIRS as a string instead of a tuple (e.g. forgot the comma), findstatic et al raise an exception like
ValueError: The joined path (/css/main.css) is located outside of the base path component (/)
which is not very enlightening in this case.
Django core solves this for INSTALLED_APPS and TEMPLATE_DIRS nicely in
django/conf/__init__.py line 93ff.
Change History (12)
Changed 6 years ago by
comment:8 Changed 6 years ago by
|Status:||closed → reopened|
|Triage Stage:||Unreviewed → Accepted|