[Django] #33401: Error in Django Tutorial # 4

9 views
Skip to first unread message

Django

unread,
Dec 30, 2021, 3:27:32 PM12/30/21
to django-...@googlegroups.com
#33401: Error in Django Tutorial # 4
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
frankclaessen |
Type: Bug | Status: new
Component: | Version: 4.0
Uncategorized | Keywords: django tutorial 4
Severity: Normal | reverse
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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

--
Ticket URL: <https://code.djangoproject.com/ticket/33401>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 30, 2021, 3:28:35 PM12/30/21
to django-...@googlegroups.com
#33401: Error in Django Tutorial # 4
-------------------------------------+-------------------------------------
Reporter: frankclaessen | Owner: nobody
Type: Bug | Status: closed
Component: Uncategorized | Version: 4.0
Severity: Normal | Resolution: fixed
Keywords: django tutorial 4 | Triage Stage:
reverse | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by frankclaessen):

* cc: frankclaessen (added)
* status: new => closed
* has_patch: 0 => 1
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/33401#comment:1>

Django

unread,
Dec 30, 2021, 4:50:02 PM12/30/21
to django-...@googlegroups.com
#33401: Error in Django Tutorial # 4
-------------------------------------+-------------------------------------
Reporter: Frank Claessen | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 4.0
Severity: Normal | Resolution: invalid

Keywords: django tutorial 4 | Triage Stage:
reverse | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* resolution: fixed => invalid
* component: Uncategorized => Documentation


--
Ticket URL: <https://code.djangoproject.com/ticket/33401#comment:2>

Reply all
Reply to author
Forward
0 new messages