Opened 84 minutes ago
Last modified 68 minutes ago
#36968 assigned Cleanup/optimization
Provide better error messages when collectstatic can't find a file referenced in another file
| Reported by: | blighj | Owned by: | blighj |
|---|---|---|---|
| Component: | contrib.staticfiles | Version: | 6.0 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
At present when ManifestStaticFilesStorage finds a reference within a file to another file that does not exist in the static files. It throws an error that causes confusion. For example https://code.djangoproject.com/ticket/21080#comment:43
Whilenoise has already got a nice pattern to provide a clearer reason to the user so they can fix the issue easily.
The {ext} file '{filename}' references a file which could not be found:
{missing}
Please check the URL references in this {ext} file, particularly any
relative paths which might be pointing to the wrong location.
Change History (2)
comment:1 by , 81 minutes ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 68 minutes ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
A thousand times, "yes"!