Fixed #13524 -- Added backwards compatibility and feature notes regarding admin inlines and formsets. Thanks to Ramiro Morales and Gabriel Hurley.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-05-12 11:56:42 +00:00
parent b8ed827952
commit d0d3e6792d
6 changed files with 114 additions and 17 deletions

View file

@ -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
------------------

View file

@ -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::