#31528: collectstatic management command ignores all system checks, including
its
own?
-----------------------------------------------+------------------------
Reporter: Keryn Knight | Owner: nobody
Type: Bug | Status: new
Component: contrib.staticfiles | Version: master
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 |
-----------------------------------------------+------------------------
Piecing this together from a user who is having trouble with staticfiles
(who doesn't, at least once) on IRC.
the system checks framework has a `check_finders` which is invoked if
`django.contrib.staticfiles` is in your `INSTALLED_APPS` which defers
checks to each individually configured finder as `finder.check()` - this
accounts for running the following line:
{{{
if not isinstance(settings.STATICFILES_DIRS, (list, tuple)):
}}}
which is intended to catch the problem scenario of `STATICFILES_DIRS = ()`
being edited to `STATICFILES_DIRS = ("mypath")` with no trailing comma to
make it a tuple, rather than an iterable string.
However, the collectstatic management command has `requires_system_checks
= False` so it appears possible to edit the value and directly run `python
manage.py collectstatic` without the type being checked or the error
raised.
Naively, I'm assuming that something like the following needs to occur:
{{{
for finder in get_finders():
finder.check() # ignoring NotImplementedError
# then somehow surface any errors back to stderr as if
`requires_system_checks = True`
}}}
I've not delved deeply into the "surface errors" part.
--
Ticket URL: <https://code.djangoproject.com/ticket/31528>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.8b2e1e56f8304808f912e00709ff1b2a%40djangoproject.com.