diff options
| author | Ken Whitesell <kenwhitesell@comcast.net> | 2019-10-30 08:39:23 +0100 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-10-30 09:01:14 +0100 |
| commit | 574f238582409613d6f6d03dc562be43459493c3 (patch) | |
| tree | 967b65600d3713992b9238b9e250d8732009e73f /docs | |
| parent | 4037b4c2b5016129a84d468b4774f45503612b3c (diff) | |
[3.0.x] Fixed #30917 -- Clarified formsets topic documentation.
Backport of 4c762588ff6748a9a9bad111894fd418c43b74a9 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/forms/formsets.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/topics/forms/formsets.txt b/docs/topics/forms/formsets.txt index 8a630f6c9f..d6aafaa8b5 100644 --- a/docs/topics/forms/formsets.txt +++ b/docs/topics/forms/formsets.txt @@ -21,9 +21,9 @@ a formset out of an ``ArticleForm`` you would do:: >>> from django.forms import formset_factory >>> ArticleFormSet = formset_factory(ArticleForm) -You now have created a formset named ``ArticleFormSet``. The formset gives you -the ability to iterate over the forms in the formset and display them as you -would with a regular form:: +You now have created a formset class named ``ArticleFormSet``. +Instantiating the formset gives you the ability to iterate over the forms +in the formset and display them as you would with a regular form:: >>> formset = ArticleFormSet() >>> for form in formset: @@ -34,11 +34,11 @@ would with a regular form:: As you can see it only displayed one empty form. The number of empty forms that is displayed is controlled by the ``extra`` parameter. By default, :func:`~django.forms.formsets.formset_factory` defines one extra form; the -following example will display two blank forms:: +following example will create a formset class to display two blank forms:: >>> ArticleFormSet = formset_factory(ArticleForm, extra=2) -Iterating over the ``formset`` will render the forms in the order they were +Iterating over a formset will render the forms in the order they were created. You can change this order by providing an alternate implementation for the ``__iter__()`` method. |
