#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               |       Keywords:
           Triage Stage:  Unreviewed           |      Has patch:  0
    Needs documentation:  0                    |    Needs tests:  0
Patch needs improvement:  0                    |  Easy pickings:  0
                  UI/UX:  0                    |
-----------------------------------------------+------------------------
 At present if the `STATICFILES_DIRS` setting contains references to
 directories which do not exist then the whole command will die with an
 `OSError`.

 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/27854>
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/049.a073579d693a0f9435ac0981bca4bfec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to