Skip to content

Instantly share code, notes, and snippets.

@carljm
Created March 21, 2013 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carljm/5211515 to your computer and use it in GitHub Desktop.
Save carljm/5211515 to your computer and use it in GitHub Desktop.
diff --git a/docs/ref/forms/models.txt b/docs/ref/forms/models.txt
index 46f7df1..dd0a422 100644
--- a/docs/ref/forms/models.txt
+++ b/docs/ref/forms/models.txt
@@ -33,8 +33,8 @@ Model Form Functions
``formfield_callback`` and ``widgets`` are all passed through to
:func:`~django.forms.models.modelform_factory`.
- Arguments ``formset``, ``extra``, ``max_num``, ``can_order``, and
- ``can_delete`` are passed through to
+ Arguments ``formset``, ``extra``, ``max_num``, ``can_order``,
+ ``can_delete`` and ``validate_max`` are passed through to
:func:`~django.forms.formsets.formset_factory`. See :ref:`formsets` for
details.
diff --git a/docs/topics/forms/formsets.txt b/docs/topics/forms/formsets.txt
index b3b06c1..f0a7668 100644
--- a/docs/topics/forms/formsets.txt
+++ b/docs/topics/forms/formsets.txt
@@ -108,14 +108,13 @@ data forms will be displayed regardless. (No extra forms will be displayed.)
By default, ``max_num`` only affects how many forms are displayed and does not
affect validation. If ``validate_max=True`` is passed to the
:func:`~django.forms.formsets.formset_factory`, then ``max_num`` will affect
-validation. See :ref:`validate_max`.formsets.txt
+validation. See :ref:`validate_max`.
.. versionchanged:: 1.6
-
-The ``validate_max`` parameter was added to
-:func:`~django.forms.formsets.formset_factory`. Also, the behavior of
-``FormSet`` was brought in line with that of ``ModelFormSet`` so that it
-displays initial data regardless of ``max_num``.
+ The ``validate_max`` parameter was added to
+ :func:`~django.forms.formsets.formset_factory`. Also, the behavior of
+ ``FormSet`` was brought in line with that of ``ModelFormSet`` so that it
+ displays initial data regardless of ``max_num``.
Formset validation
------------------
@@ -293,7 +292,7 @@ that the number of forms in the data set is less than or equal to ``max_num``.
``validate_max=True`` validates against ``max_num`` strictly even if
``max_num`` was exceeded because the amount of initial data supplied was
-excessive.
+excessive.
Applications which need more customizable validation of the number of forms
should use custom formset validation.
@@ -306,20 +305,17 @@ should use custom formset validation.
forms above ``max_num`` will be validated. The remainder will be
truncated entirely. This is to protect against memory exhaustion attacks
using forged POST requests.
-
+
.. versionchanged:: 1.6
-
-The ``validate_max`` parameter was added to
-:func:`~django.forms.formsets.formset_factory`.
+ The ``validate_max`` parameter was added to
+ :func:`~django.forms.formsets.formset_factory`.
Dealing with ordering and deletion of forms
-------------------------------------------
-Common use cases with a formset is dealing with ordering and deletion of the
-form instances. This has been dealt with for you. The
-:func:`~django.forms.formsets.formset_factory` provides two optional
-parameters ``can_order`` and ``can_delete`` that will do the extra work of
-adding the extra fields and providing simpler ways of getting to that data.
+The :func:`~django.forms.formsets.formset_factory` provides two optional
+parameters ``can_order`` and ``can_delete`` to help with ordering of forms in
+formsets and deletion of forms from a formset.
``can_order``
~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment