From 3513234cf8a9ca0195536f7856729049adbd8444 Mon Sep 17 00:00:00 2001 From: Julien Phalip Date: Tue, 13 Sep 2011 08:22:53 +0000 Subject: [PATCH] Fixed #16815 -- Rectified the code example for hidden_fields and visible_fields in the forms documentation. Thanks, joonas. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16823 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/topics/forms/index.txt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt index 234417bf00..5b6f87fbec 100644 --- a/docs/topics/forms/index.txt +++ b/docs/topics/forms/index.txt @@ -333,16 +333,13 @@ and visible fields independently: ``hidden_fields()`` and these two methods::
+ {# Include the hidden fields #} + {% for hidden in form.hidden_fields %} + {{ hidden }} + {% endfor %} + {# Include the visible fields #} {% for field in form.visible_fields %}
- - {# Include the hidden fields in the form #} - {% if forloop.first %} - {% for hidden in form.hidden_fields %} - {{ hidden }} - {% endfor %} - {% endif %} - {{ field.errors }} {{ field.label_tag }}: {{ field }}