#33401 closed Bug (invalid)
Error in Django Tutorial # 4
Reported by: | Frank Claessen | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 4.0 |
Severity: | Normal | Keywords: | django tutorial 4 reverse |
Cc: | Frank Claessen | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
On page 49 part of views.py is changed and at the end of
def vote ...:
there is a redirect as follows:
return HttpResponseRedirect(reverse('polls:results', args=(question.id,)))
There is an error however that shows that question.id is in fact empty
The correct line therefore has to be:
return HttpResponseRedirect(reverse('polls:results', args=(question_id,)))
The error is caused by the reverse part by the way, not by the redirect
Change History (2)
comment:1 by , 3 years ago
Cc: | added |
---|---|
Has patch: | set |
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 3 years ago
Component: | Uncategorized → Documentation |
---|---|
Resolution: | fixed → invalid |
Note:
See TracTickets
for help on using tickets.