#31520: ManifestStaticFilesStorage should not raise ValueError on missing file 
when
manifest_strict=False
-------------------------------------+-------------------------------------
     Reporter:  thenewguy            |                    Owner:  thenewguy
         Type:  New feature          |                   Status:  closed
    Component:  contrib.staticfiles  |                  Version:  3.0
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

 * status:  assigned => closed
 * type:  Bug => New feature
 * has_patch:  1 => 0
 * resolution:   => wontfix
 * stage:  Accepted => Unreviewed


Comment:

 Hi Gordon.

 Thanks for the effort here. On review, I don't think we can pull this in
 as a breaking change — it's just too well established:

 * That `hashed_name()` raises for a missing file has been in place
 
[https://github.com/django/django/commit/1d32bdd3c9586ff10d0799264105850fa7e3f512
 #diff-c7242dedd7c93b857a668acec1e310feR65-R69 since
 CachedStaticFilesStorage was added] for #15252.
 * That `hashed_name()` is used here was part of the design when
 `manifest_strict` was added for #24452.

 They'll be too many people expecting this behaviour to just change it.

 So, we could add a new feature `file_exists_strict` or something, but on
 balance I don't thing that's worth the complication.

 > ...it would be preferrable for a typo to cause a 404 instead of
 preventing a page from rendering.

 Concluding I think I have to say that failing hard wins. At the very least
 it stops you sneaking that typo into production when you failed to notice
 that the referenced static file didn't load.

 Alternative would be to subclass the storage to implement the more lax
 behaviour.

 I hope that makes sense.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31520#comment:10>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.1fda31d1da52645b53cd84db8098772d%40djangoproject.com.

Reply via email to