#19569: Add "widgets" argument to function's modelformset_factory inputs
-----------------------------+--------------------
     Reporter:  Ameriks      |      Owner:  nobody
         Type:  New feature  |     Status:  new
    Component:  Forms        |    Version:  1.4
     Severity:  Normal       |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  1
Easy pickings:  1            |      UI/UX:  0
-----------------------------+--------------------
 Function modelformset_factory doesn't have widgets=None in it's input
 arguments, but function modelform_factory (which is called from def
 modelformset_factory) widgets is defined as optional input argument.

 As the fix is in 2 lines, then I included it in the description.

 So the fix would be:

 {{{
 def modelformset_factory(model, form=ModelForm, formfield_callback=None,
                          formset=BaseModelFormSet,
                          extra=1, can_delete=False, can_order=False,
                          max_num=None, fields=None, exclude=None,
 widgets=None):
     """
     Returns a FormSet class for the given Django model class.
     """
     form = modelform_factory(model, form=form, fields=fields,
 exclude=exclude,
                              formfield_callback=formfield_callback,
 widgets=widgets)
     FormSet = formset_factory(form, formset, extra=extra, max_num=max_num,
                               can_order=can_order, can_delete=can_delete)
     FormSet.model = model
     return FormSet

 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19569>
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