{{{
@property
def media(self):
# All the forms on a FormSet are the same, so you only need to
interrogate the first form for media.
if self.forms:
return self.forms[0].media
else:
return self.empty_form.media
}}}
But formset have 3 types of form:
1.bound from for existed objects.
2.unbound from for new objects.
3.the empty form for JS "add new row".
All of them are NOT the same.
The every Form can have own fields.widget and field.widget.media
i think, we should make a possibility, to add a some media in form.init
Or we should collect media in the form.init moment. Not after. Not one
time for one form.
--
Ticket URL: <https://code.djangoproject.com/ticket/29437>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => wontfix
Comment:
Given some discussion about deprecating `Media` (#22298), I don't think we
should spend time on this issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/29437#comment:1>