Opened 7 years ago

Closed 7 years ago

#18560 closed Bug (invalid)

polls/detail.html Demo Code in Django 1.4 Tutorial is Incorrect?

Reported by: Benjamin E White Owned by: nobody
Component: Documentation Version: 1.4
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


If I'm not mistaken, the demo code for polls/detail.html is incorrect.


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

When I view this at, it gives me the appropriate header, but the bullets are blank (i can see the bullets but no text).

My bulleted lists appear as expected after making this modification, which is in line with the model described here in the first part of the tutorial:

  <li>{{ choice.choice_text }}</li>

Change History (2)

comment:1 Changed 7 years ago by Benjamin E White

Same issue here, with same fix.

comment:2 Changed 7 years ago by Claude Paroz

Resolution: invalid
Status: newclosed

You are probably mixing versions of the tutorial. choice.choice has been renamed choice.choice_text in the development version of the tutorial.

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