#23506: How to reference static files outside of the template
-------------------------------------+-------------------------------------
Reporter: thenewguy | Owner: nobody
Type: Uncategorized | Status: closed
Component: contrib.staticfiles | Version: 1.7
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
Has patch: 0 | Unreviewed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):
* status: new => closed
* resolution: => wontfix
Comment:
Such a function doesn't belong to Django. We aren't going to use a bare
`except` and rely on logging instead of raising exceptions.
Referencing a static file that doesn't exist is a bug. The proper behavior
is to raise an exception in that case. Silencing errors isn't "safe" or
"correct".
That said, your last question points out that there's no documented way to
accessing the URL of static files. For the sake of clarity, I've filed
#23563 specifically about that problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/23506#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 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/067.e313781df5f16f98546ab45646cef09d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.