You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-d...@googlegroups.com
There's been some discussion in ticket #22298 about deprecating the widget Media class. If this would make you particularly happy or sad, please leave your feedback on this thread or on the ticket.
Mark Lavin
unread,
Apr 1, 2014, 3:27:30 PM4/1/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-d...@googlegroups.com
In my experience using the Media class is really only helpful in one place: the admin. If you have a third-party widget which requires CSS or JS is a pain to include it without the use of Media. Users want to just include the widget in the form class and have it "just work". A majority of the issues/questions I deal with on django-selectable are about how to get it working in the admin. Telling people to override and include it in the admin/base_site.html only seems adds confusion. It is documented how to override the admin templates but it would seem no one actually reads or understands them. In some cases they are trying to use apps which are already overriding it (like django-admin-tools). Outside the admin the Media class isn't nearly as helpful. It's easy enough to document adding the CSS/JS references in your base.html and users seem to understand that.
The biggest shortcoming of the Media class is summarized in https://code.djangoproject.com/ticket/12265. The order in which it is added isn't helpful nor well documented. I wouldn't complain too loudly if it was removed. It would be nice if it was replaced with another hook (possibly only in the admin) to improve the story for a third-party widget which requires some CSS/JS.