[1.1.X] Fixed #11755 -- Added documentation for an edge case of FormSet usage. Thanks to ffualo for the suggestion.
Merge of r11549 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11571 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2075da3525
commit
d30dd3e9c9
|
@ -541,6 +541,12 @@ Then, pass your ``BaseAuthorFormSet`` class to the factory function::
|
||||||
|
|
||||||
>>> AuthorFormSet = modelformset_factory(Author, formset=BaseAuthorFormSet)
|
>>> AuthorFormSet = modelformset_factory(Author, formset=BaseAuthorFormSet)
|
||||||
|
|
||||||
|
If you want to return a formset that doesn't include *any* pre-existing
|
||||||
|
instances of the model, you can specify an empty QuerySet::
|
||||||
|
|
||||||
|
>>> AuthorFormSet(queryset=Author.objects.none())
|
||||||
|
|
||||||
|
|
||||||
Controlling which fields are used with ``fields`` and ``exclude``
|
Controlling which fields are used with ``fields`` and ``exclude``
|
||||||
-----------------------------------------------------------------
|
-----------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue