Make `collectstatic` warn (rather than blow up) on missing directories
|Ready for checkin
|Patch needs improvement:
At present if the
STATICFILES_DIRS setting contains references to directories which do not exist then the whole command will die with an
A situation I've seen bite a few newcomers to Django is that they will have an empty static directory which (being empty) won't get tracked by git. This means that
collectstatic works when they run it locally, but blows up with a (to them) cryptic error when they try to deploy.
If we made
collectstatic simply log a warning in the case of non-existent directories and continue processing then we could avoid this problem and remove one possible source of frustration for newcomers.
If this approach seems acceptable to others I am happy to submit an appropriate patch.
Change History (20)
comment:8 by , 7 years ago
|Unreviewed → Accepted
|Uncategorized → Cleanup/optimization