Opened 12 years ago
Closed 12 years ago
#18851 closed Uncategorized (invalid)
Error in documentation
Reported by: | 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 |
Description
https://docs.djangoproject.com/en/1.4/intro/tutorial03/#use-the-template-system
Code example has "choice.choice" in FOR loop, it should just be "choice".
CURRENT (INCORRECT):
<h1>{{ poll.question }}</h1> <ul> {% for choice in poll.choice_set.all %} <li>{{ choice.choice }}</li> {% endfor %} </ul>
CORRECT:
<h1>{{ poll.question }}</h1> <ul> {% for choice in poll.choice_set.all %} <li>{{ choice }}</li> {% endfor %} </ul>
Note:
See TracTickets
for help on using tickets.
You are mixing versions of the tutorial. choice.choice has been renamed choice.choice_text in the development version of the tutorial.