#18942: Documentation of `{% get_static_prefix %}` unclear
-------------------------------------+-------------------------------------
     Reporter:  aaugustin            |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  master
    Component:  Documentation        |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by jezdez):

 Oh, I forgot to mention, each have different use cases:

 - `{{ STATIC_URL }}` only works if you have the request in the context
 - `get_static_prefix` does everywhere (both of them were in 1.3)
 - `{% static %}` from staticfiles uses the storage and was added later
 along the core `{% static %}` tag that just joins the given path with the
 `STATIC_URL` (in case anyone **doesn't** want to use the contrib app
 staticfiles)

 IMO we should only recommend the core `{% static %}` tag or the
 staticfiles equivalent instead of `{{ STATIC_URL }}` as it always works.
 `get_static_prefix` should be deprecated in favor of that. The context
 processors should use `iri_to_uri`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18942#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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to