#29437: Formset.media collect Form.Media and Field.widget.media not correct
--------------------------------------+------------------------
Reporter: danilovmy | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version:
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------+------------------------
in Django.forms.formsets.py (django 1.9)
{{{
@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.
--
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/052.97191ea70d31a66c3fca4449beaad0b0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.