Opened 11 years ago
Closed 11 years ago
#22694 closed Bug (worksforme)
Code error in Django 1.6 tutorial, part 3
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Documentation | Version: | 1.6 |
| Severity: | Release blocker | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
In the definition for the vote method, the line:
return HttpResponseRedirect(reverse('polls:results', args=(p.id,)))
should be:
return HttpResponseRedirect(reverse('polls:results', args=[p.id])) (brackets, not parens)
I'm labeling this release blocker as the the code will not run without the change.
Note:
See TracTickets
for help on using tickets.
Hi,
The code looks OK to me.
I suspect you might have typed
args=(p.id)instead ofargs=(p.id,).Thanks.