diff --git a/docs/topics/forms/formsets.txt b/docs/topics/forms/formsets.txt index 6149290d2e..3fb2b0af16 100644 --- a/docs/topics/forms/formsets.txt +++ b/docs/topics/forms/formsets.txt @@ -102,6 +102,7 @@ provide an invalid article:: >>> data = { ... 'form-TOTAL_FORMS': u'2', ... 'form-INITIAL_FORMS': u'0', + ... 'form-MAX_NUM_FORMS': u'0', ... 'form-0-title': u'Test', ... 'form-0-pub_date': u'16 June 1904', ... 'form-1-title': u'Test', @@ -189,6 +190,7 @@ is where you define your own validation that works at the formset level:: >>> data = { ... 'form-TOTAL_FORMS': u'2', ... 'form-INITIAL_FORMS': u'0', + ... 'form-MAX_NUM_FORMS': u'0', ... 'form-0-title': u'Test', ... 'form-0-pub_date': u'16 June 1904', ... 'form-1-title': u'Test', @@ -247,6 +249,7 @@ happen when the user changes these values:: >>> data = { ... 'form-TOTAL_FORMS': u'3', ... 'form-INITIAL_FORMS': u'2', + ... 'form-MAX_NUM_FORMS': u'0', ... 'form-0-title': u'Article #1', ... 'form-0-pub_date': u'2008-05-10', ... 'form-0-ORDER': u'2', @@ -284,7 +287,7 @@ Lets create a formset with the ability to delete:: ... ]) >>> for form in formset.forms: .... print form.as_table() - + @@ -302,6 +305,7 @@ delete fields you can access them with ``deleted_forms``:: >>> data = { ... 'form-TOTAL_FORMS': u'3', ... 'form-INITIAL_FORMS': u'2', + ... 'form-MAX_NUM_FORMS': u'0', ... 'form-0-title': u'Article #1', ... 'form-0-pub_date': u'2008-05-10', ... 'form-0-DELETE': u'on', diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index 1269dd030c..96ed0ab544 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -544,7 +544,7 @@ with the ``Author`` model. It works just like a regular formset:: >>> formset = AuthorFormSet() >>> print formset - +