#21006: Overriding clean() on an InlineFormSet
-------------------------------+--------------------
     Reporter:  treysta@…      |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Documentation  |    Version:  1.5
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 https://docs.djangoproject.com/en/1.5/topics/forms/modelforms/#overriding-
 clean-on-an-inlineformset

 It looks like there is a somewhat relevant piece of information missing
 from this section. It leaves out the fact that you also must specify which
 formset to use when creating your inlineformset in the view:

 Currently:

 "See Overriding clean() on a ModelFormSet, but subclass BaseInlineFormSet
 rather than BaseModelFormSet."

 Suggestion:

 "See Overriding clean() on a ModelFormSet, but subclass BaseInlineFormSet
 rather than BaseModelFormSet. You must also specify which formset to use
 when creating your inlineformset in your view:"

 >>> from django.forms.models import inlineformset_factory
 >>> BookFormSet = inlineformset_factory(Author, Book''', formset=
 MyInlineFormSet''')
 >>> author = Author.objects.get(name=u'Mike Royko')
 >>> formset = BookFormSet(instance=author)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21006>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/060.34359f1cc9f9e5793beb563f8de8e168%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to