Opened 6 years ago
Closed 6 years ago
#29796 closed Cleanup/optimization (fixed)
Add a system check error if the prefix in the STATICFILES_DIRS ends with slash
Reported by: | Paweł Kołodziej | Owned by: | nobody |
---|---|---|---|
Component: | contrib.staticfiles | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
With following config:
STATICFILES_DIRS=[ ('front/', os.path.join(BASE_DIR, 'front/build')) ]
files from 'front/build' are collected by 'manage.py collectstatic' but no served by 'runserver'.
The problem is caused by trailing slash in prefix ('front/' instead of 'front').
My first solution was to normalize the prefix, but it was suggested that it's better to report error.
Change History (2)
comment:1 by , 6 years ago
Description: | modified (diff) |
---|---|
Summary: | Report error if the prefix in the STATICFILES_DIRS ends with slash → Add a system check error if the prefix in the STATICFILES_DIRS ends with slash |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In 05c578bc: