#28604: Adjust HashedFilesMixin so it doesn't leave intermediate files behind 
for
ManifestStaticFilesStorage
-------------------------------------+-------------------------------------
               Reporter:  Ed Morley  |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  master
  contrib.staticfiles                |       Keywords:
               Severity:  Normal     |  ManifestStaticFilesStorage,
           Triage Stage:             |  HashedFilesMixin
  Unreviewed                         |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Currently when using `ManifestStaticFilesStorage`, collectstatic generates
 duplicate versions of some files.

 For example looking at the output for `contrib.admin` for Django 1.11.5,
 there is:

 {{{
 admin/css/base.css
 admin/css/base.5af66c1b1797.css
 admin/css/base.6b517d0d5813.css
 admin/css/base.31652d31b392.css
 }}}

 This is exacerbated when using something like WhiteNoise's
 `CompressedStaticFilesMixin`, which then has to spend extra time
 generating gzip and Brotli compressed versions of every file (or else try
 and work around it: [https://github.com/evansd/whitenoise/issues/147
 evansd/whitenoise#147]).

 This was called unavoidable/working as intended according to:
 https://code.djangoproject.com/ticket/24452#comment:16
 https://github.com/django/django/pull/6507

 However now that it's looking like `CachedStaticFilesStorage` will end up
 being removed ([https://groups.google.com/forum/#!topic/django-
 developers/fmfQvuHBStk mailing list thread]; or at the very least we're
 discouraging people from using it, since it's buggy in several scenarios)
 - the intermediate files needn't be left behind.

 Even before `CachedStaticFilesStorage` ends up being removed, we could
 perhaps add a `keep_intermediate_files` property to `HashedFilesMixin`,
 that is set to `False` for `CachedStaticFilesStorage` and `True` for
 `ManifestStaticFilesStorage`, allowing us to fix the latter in the
 meantime.

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

Reply via email to