#27854: Make `collectstatic` warn (rather than blow up) on missing directories
-------------------------------------+-------------------------------------
Reporter: David Evans | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.staticfiles | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by David Evans):
Replying to [comment:3 Aymeric Augustin]:
> In the case of Heroku which swallows the output of collectstatic, if
`STATICFILES_DIRS` doesn't have a correct value, the change suggested here
will make it pretend that it succeeded, even though it didn't collect
files, while it currently says it's failing. I think that's a problem:
"errors shouldn't pass silently" :-)
Yes, absolutely agree that errors shouldn't pass silently. In the case of
the Heroku buildpack, it does suppress some of the output but any warning
messages will get displayed:
https://github.com/heroku/heroku-buildpack-
python/blob/677dfeec119f28b4d1a8f679b38b2d4e407f4533/bin/steps/collectstatic#L33
Would another option be for `collectstatic` to note that a directory was
missing, issue a warning, ''proceed with collecting the rest of the static
files'', and then exit with status > 0 at the end? That way, the user
would still have a working set of static files.
--
Ticket URL: <https://code.djangoproject.com/ticket/27854#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.5d45eedf7284de5e1e582a0131271993%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.