Changes between Initial Version and Version 1 of Ticket #21006
- Timestamp:
- Aug 30, 2013, 1:52:46 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #21006
- Property Triage Stage Unreviewed → Accepted
- Property Summary Overriding clean() on an InlineFormSet → Add an example of the formset argument for inlineformset_factory
- Property Type Uncategorized → Cleanup/optimization
-
Ticket #21006 – Description
initial v1 10 10 11 11 "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:" 12 12 {{{ 13 13 >>> from django.forms.models import inlineformset_factory 14 >>> BookFormSet = inlineformset_factory(Author, Book ''', formset= MyInlineFormSet''')14 >>> BookFormSet = inlineformset_factory(Author, Book, formset= MyInlineFormSet) 15 15 >>> author = Author.objects.get(name=u'Mike Royko') 16 16 >>> formset = BookFormSet(instance=author) 17 17 }}}