Fixed #9027 -- Corrected the documentation about can_delete default value. Thanks gsf for catching this.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Brian Rosner 2008-09-12 16:52:28 +00:00
parent 1a2296267d
commit 9ee0b0d384
1 changed files with 7 additions and 2 deletions

View File

@ -411,8 +411,9 @@ working with ``ModelForm`` instances instead of ``Form`` instances::
<tr><th><label for="id_form-0-birth_date">Birth date:</label></th><td><input type="text" name="form-0-birth_date" id="id_form-0-birth_date" /><input type="hidden" name="form-0-id" id="id_form-0-id" /></td></tr>
.. note::
One thing to note is that ``modelformset_factory`` uses ``formset_factory``
and by default uses ``can_delete=True``.
``modelformset_factory`` uses ``formset_factory`` to generate the forms
making model formsets simply an abstraction on top of formsets that knows
about models and how to interact.
Changing the queryset
---------------------
@ -559,6 +560,10 @@ some author you would do::
>>> author = Author.objects.get(name=u'Orson Scott Card')
>>> formset = BookFormSet(instance=author)
.. note::
``inlineformset_factory`` uses ``modelformset_factory`` and marks
``can_delete=True``.
More than one foreign key to the same model
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~