diff options
| author | Brian Rosner <brosner@gmail.com> | 2008-09-12 16:52:28 +0000 |
|---|---|---|
| committer | Brian Rosner <brosner@gmail.com> | 2008-09-12 16:52:28 +0000 |
| commit | 9ee0b0d384f86e31600772340383f2f2f7ca8611 (patch) | |
| tree | 22d7a1c2ec80c07fe85bde66b45324f513933fb4 /docs/topics/forms/modelforms.txt | |
| parent | 1a2296267d034c6cf4dbac6709d9c9f77787bbcf (diff) | |
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
Diffstat (limited to 'docs/topics/forms/modelforms.txt')
| -rw-r--r-- | docs/topics/forms/modelforms.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index 3f744e6221..b9d24034d4 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
