Opened 10 years ago

Closed 10 years ago

#22597 closed Cleanup/optimization (wontfix)

update the inlineformset_factory example to include extra

Reported by: saurabh.hirani@… Owned by: nobody
Component: Documentation Version: 1.6
Severity: Normal Keywords: inlineformset
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,

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

should have

BookFormSet = inlineformset_factory(Author, Book, extra=0)

as deafult value of extra is 3.

Change History (1)

comment:1 by Tim Graham, 10 years ago

Resolution: wontfix
Status: newclosed

Thanks for offering the suggestion, but I don't think there's a problem with the example as it is, and I'm not sure making it more complicated has much benefit either.

Note: See TracTickets for help on using tickets.
Back to Top