diff options
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/forms/formsets.txt | 9 | ||||
| -rw-r--r-- | docs/topics/forms/modelforms.txt | 4 |
2 files changed, 5 insertions, 8 deletions
diff --git a/docs/topics/forms/formsets.txt b/docs/topics/forms/formsets.txt index e1af237598..732fd93de1 100644 --- a/docs/topics/forms/formsets.txt +++ b/docs/topics/forms/formsets.txt @@ -68,6 +68,8 @@ list of dictionaries as the initial data. :ref:`Creating formsets from models with model formsets <model-formsets>`. +.. _formsets-max-num: + Limiting the maximum number of forms ------------------------------------ @@ -83,7 +85,7 @@ limit the maximum number of empty forms the formset will display:: .. versionchanged:: 1.2 -If the value of ``max_num`` is geater than the number of existing related +If the value of ``max_num`` is greater than the number of existing objects, up to ``extra`` additional blank forms will be added to the formset, so long as the total number of forms does not exceed ``max_num``. @@ -91,11 +93,6 @@ A ``max_num`` value of ``None`` (the default) puts no limit on the number of forms displayed. Please note that the default value of ``max_num`` was changed from ``0`` to ``None`` in version 1.2 to allow ``0`` as a valid value. -.. versionadded:: 1.2 - -The dynamic "Add Another" link in the Django admin will not appear if -``max_num`` is less than the number of currently displayed forms. - Formset validation ------------------ diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index 066545756f..c93527ce70 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -661,8 +661,8 @@ Limiting the number of editable objects .. versionchanged:: 1.2 -As with regular formsets, you can use the ``max_num`` parameter to -``modelformset_factory`` to limit the number of extra forms displayed. +As with regular formsets, you can use the ``max_num`` and ``extra`` parameters +to ``modelformset_factory`` to limit the number of extra forms displayed. ``max_num`` does not prevent existing objects from being displayed:: |
