On 06/10/2015 07:52 AM, Tim Graham wrote:
> The problem has come up before:
> https://code.djangoproject.com/ticket/18455
> 
> but there is some question about whether the design of the Media class
> is something we should try to continue building on:
> https://code.djangoproject.com/ticket/22298
> 
> The suggestion to have the built-in static tag work like admin_static
> does seem like a practical one. The question is whether practicality
> beats purity (keeping contrib dependencies, albeit a conditional one in
> this case, out of core) in this case. I'd say yes, unless there's a
> suitable alternate proposal to address the problem.

It seems like there's some confusion here between form Media and the
'static' template tag; the two do similar things, but are separate. This
report, and #18455, are about form Media, which means having
staticfiles' "static" tag in core builtin tags wouldn't even help. The
problematic code is in Media.absolute_path() method, in
django/forms/widgets.py; template tags are not involved.

I think Jannis' suggestion in #18455 (that there should be a
staticfiles-specific subclass of Media that uses the storage URL) is the
right one, presuming we even want to continue recommending the Media
approach at all. The questions raised about that in #22298 are good
ones. Personally I don't ever use Media, due to the performance effects
of loading lots of little JS files. This gets into the question of
Django's support for "front-end components" that was recently discussed
in another thread.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5578983E.2080602%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to