Opened 16 years ago

Closed 16 years ago

#10009 closed (fixed)

Wrong variable name in example (page "Working with forms")

Reported by: karihre@… Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In the "Working with forms" (http://docs.djangoproject.com/en/dev/topics/forms/) page the third example from the bottom has a wrong variable in one place. The relevant code in the example is:

            {% if forloop.first %}
                {% for hidden in form.hidden_fields %}
                {{ field }}
                {% endfor %}
            {% endif %}

Instead of {{ field }} it should read {{ hidden }} (unless I am much mistaken).

Thanks for all your hard work!

Change History (2)

comment:1 by Chris Beaven, 16 years ago

Triage Stage: UnreviewedReady for checkin

Yep, either this fix, or I'd be more inclined to change the first line to {% for field in form.hidden_fields %}
I'll let the committer decide

comment:2 by Russell Keith-Magee, 16 years ago

Resolution: fixed
Status: newclosed

(In [9862]) Fixed #10009 -- Corrected a field reference in an example on rendering hidden fields. Thanks to karihre@… for the report.

Note: See TracTickets for help on using tickets.
Back to Top