Opened 12 years ago

Closed 12 years ago

#19927 closed Bug (invalid)

Tutorial Part 3 - choice.choice_text is choice.choice

Reported by: juril Owned by: nobody
Component: Documentation Version: 1.5-rc-1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This applies both to Tutorial Part 3 and 4.

Choice class contains a "choice" field that we want to use when creating a template for its view.

<h1>{{ poll.question }}</h1>
<ul>
{% for choice in poll.choice_set.all %}
    <li>{{ choice.choice_text }}</li>
{% endfor %}
</ul>

should be changed as

<h1>{{ poll.question }}</h1>
<ul>
{% for choice in poll.choice_set.all %}
    <li>{{ choice.choice }}</li>
{% endfor %}
</ul>

for the text associated to a choice to be correctly displayed.

Change History (1)

comment:1 by Aymeric Augustin, 12 years ago

Resolution: invalid
Status: newclosed

You're mixing versions of the tutorial — you started with version 1.4 and continued with version 1.5 (probably).

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