Opened 5 years ago

Closed 5 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


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>
{% for choice in poll.choice_set.all %}
    <li>{{ choice.choice_text }}</li>
{% endfor %}

should be changed as

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

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

Change History (1)

comment:1 Changed 5 years ago by Aymeric Augustin

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