Fixed #7832 -- Corrected a formatting error in the newforms docs. Thanks to omat@gezgin.com for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2008-07-19 11:27:55 +00:00
parent 649463dd34
commit c819252bf5
1 changed files with 3 additions and 3 deletions

View File

@ -2196,7 +2196,7 @@ form::
... pub_date = forms.DateField() ... pub_date = forms.DateField()
You might want to allow the user to create several articles at once. To create You might want to allow the user to create several articles at once. To create
a formset of ``ArticleForm``s you would do:: a formset of out of an ``ArticleForm`` you would do::
>>> from django.newforms.formsets import formset_factory >>> from django.newforms.formsets import formset_factory
>>> ArticleFormSet = formset_factory(ArticleForm) >>> ArticleFormSet = formset_factory(ArticleForm)
@ -2471,8 +2471,8 @@ default fields/attributes of the order and deletion fields::
<tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" id="id_form-0-pub_date" /></td></tr> <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" id="id_form-0-pub_date" /></td></tr>
<tr><th><label for="id_form-0-my_field">My field:</label></th><td><input type="text" name="form-0-my_field" id="id_form-0-my_field" /></td></tr> <tr><th><label for="id_form-0-my_field">My field:</label></th><td><input type="text" name="form-0-my_field" id="id_form-0-my_field" /></td></tr>
Using a formsets in views and templates Using a formset in views and templates
--------------------------------------- --------------------------------------
Using a formset inside a view is as easy as using a regular ``Form`` class. Using a formset inside a view is as easy as using a regular ``Form`` class.
The only thing you will want to be aware of is making sure to use the The only thing you will want to be aware of is making sure to use the