﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27618	docs/intro/tutorial04.txt: Incorrect Information in Amend Views section	Karan Sharma	Karan Sharma	"In the tutorial https://docs.djangoproject.com/en/1.10/intro/tutorial04/#amend-views, the tutorial says that `no changes needed` for `vote()`

{{{
def vote(request, question_id):
    ... # same as above, no changes needed.

}}}

Since `question_id` is replaced by `pk`, so this change needs to be done in the `vote()` method as well. 

Error Log:


{{{
Traceback:

File ""/Users/ninjaPython/Work/django-tutorial/venv/lib/python3.5/site-packages/django/core/handlers/exception.py"" in inner
  39.             response = get_response(request)

File ""/Users/ninjaPython/Work/django-tutorial/venv/lib/python3.5/site-packages/django/core/handlers/base.py"" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File ""/Users/ninjaPython/Work/django-tutorial/venv/lib/python3.5/site-packages/django/core/handlers/base.py"" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File ""/Users/ninjaPython/Work/django-tutorial/myblog/polls/views.py"" in vote
  26.     question = get_object_or_404(Question,pk=question_id)

Exception Type: NameError at /polls/1/vote/
Exception Value: name 'question_id' is not defined

}}}

Screenshot:  http://i.imgur.com/m3d7GDA.png

I'd like to submit a patch for it if the community approves it as a bug."	Uncategorized	closed	Documentation	1.10	Normal	invalid	tutorial, documentation		Unreviewed	0	0	0	0	1	0
