#33401 closed Bug (invalid)
Error in Django Tutorial # 4
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.