#18225: Staticfiles template tag does not fail silently
-------------------------------------+------------------------------------
     Reporter:  bouke                |                    Owner:  moritzs
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.staticfiles  |                  Version:  1.4
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+------------------------------------

Comment (by anon0405@…):

 It would be nice if there were a setting that toggled whether this fails
 loudly or silently -- often it is better to serve an html file with broken
 formatting (missing css), missing functionality (missing js), or missing
 niceties (missing .ico) than to throw up a server error and prevent any
 information from reaching the end user.

 Especially where the behavior of {% static %} is explicitly to not raise
 errors in development, the current behavior creates time bombs that are
 out of step with the rest of django's template error philosophy -- fail
 silently whenever possible.

 Two options are:
 * {% static 'file/path.stuff' True %} -- passing an optional parameter of
 whether to fail silently, so this can be turned on/off as needed
 * STATIC_TAG_FAILS_SILENTLY=True -- an option in settings.py

 If there isn't a way to make it fail silently in production, then the
 errors should somehow be raised in DEV so they are caught and fixed.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18225#comment:5>
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/063.6490c7eb7ef3b00dc9b035a2f20c069b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to