From 48edb177edf04854999355dfdfe23fc6ee312d7b Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 4 Jan 2010 21:55:52 +0000 Subject: Fixed #12053 - form examples don't validate according to w3c Thanks to skyl for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12086 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/topics/forms/modelforms.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/topics/forms/modelforms.txt') diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index 024479508a..7049464f86 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -705,14 +705,14 @@ There are three ways to render a formset in a Django template. First, you can let the formset do most of the work:: -
+ {{ formset }}
Second, you can manually render the formset, but let the form deal with itself:: -
+ {{ formset.management_form }} {% for form in formset.forms %} {{ form }} @@ -725,7 +725,7 @@ form as shown above. See the :ref:`management form documentation Third, you can manually render each field:: - + {{ formset.management_form }} {% for form in formset.forms %} {% for field in form %} @@ -738,7 +738,7 @@ If you opt to use this third method and you don't iterate over the fields with a ``{% for %}`` loop, you'll need to render the primary key field. For example, if you were rendering the ``name`` and ``age`` fields of a model:: - + {{ formset.management_form }} {% for form in formset.forms %} {{ form.id }} -- cgit v1.3