From d0d3e6792da9e716e547f23dfd44706d2bab3c8e Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 12 May 2010 11:56:42 +0000 Subject: 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 --- docs/topics/forms/formsets.txt | 9 +++------ docs/topics/forms/modelforms.txt | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'docs/topics/forms') 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 `. +.. _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:: -- cgit v1.3