#28847: Manifest/CachedStaticFilesStorage should keep providing cache-busting
when
DEBUG is true
-------------------------------------+-------------------------------------
Reporter: Dan Raviv | Owner: nobody
Type: New feature | Status: closed
Component: Core (Cache system) | Version: master
Severity: Normal | Resolution: wontfix
Keywords: cache, storage, | Triage Stage:
DEBUG | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Carsten Fuchs):
Just a note: I use a local Apache instance for development and thus run
`touch .../wsgi.py` after every change and `collectstatic` after any
change to static files anyways. I too was surprised that the hashed
versions of paths are not used in `DEBUG` mode. The problem can be solved
by overriding the `url()` method of `ManifestStaticFilesStorage`, but I'd
rather explicitly write in `settings.py`:
{{{
#!python
if not DEBUG:
STATICFILES_STORAGE =
'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
}}}
to achieve more convenient development with `runserver` than having this
decision anticipated in `ManifestStaticFilesStorage`.
In other words, I concur with the original poster:
`ManifestStaticFilesStorage` should work the same with `DEBUG = True`. A
developer that consciously enables `ManifestStaticFilesStorage` but
doesn't want to have it in development can express this explicitly as
shown above.
--
Ticket URL: <https://code.djangoproject.com/ticket/28847#comment:2>
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/063.bd909128de4fadf6ca823be4bb700f2a%40djangoproject.com.