diff options
| author | Clifford Gama <53076065+cliff688@users.noreply.github.com> | 2024-11-13 20:14:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-13 15:14:16 -0300 |
| commit | 299b072498b23d1d7fe9f1545f7b27b73ca8e22b (patch) | |
| tree | f638614442a82c5d150c724725f2647a48384d9d /docs | |
| parent | b9aa3239ab1328c915684d89b87a49459cabd30b (diff) | |
Fixed #35843 -- Clarified formset docs about reordering forms.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/forms/formsets.txt | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/docs/topics/forms/formsets.txt b/docs/topics/forms/formsets.txt index 1f49044e6e..3b68ed614c 100644 --- a/docs/topics/forms/formsets.txt +++ b/docs/topics/forms/formsets.txt @@ -48,13 +48,10 @@ following example will create a formset class to display two blank forms: >>> ArticleFormSet = formset_factory(ArticleForm, extra=2) -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. - -Formsets can also be indexed into, which returns the corresponding form. If you -override ``__iter__``, you will need to also override ``__getitem__`` to have -matching behavior. +Formsets can be iterated and indexed, accessing forms in the order they were +created. You can reorder the forms by overriding the default +:py:meth:`iteration <object.__iter__>` and +:py:meth:`indexing <object.__getitem__>` behavior if needed. .. _formsets-initial-data: |
