Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#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 Frank Claessen, 3 years ago

Cc: Frank Claessen added
Has patch: set
Resolution: fixed
Status: newclosed

comment:2 by Tim Graham, 3 years ago

Component: UncategorizedDocumentation
Resolution: fixedinvalid
Note: See TracTickets for help on using tickets.
Back to Top