﻿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
22700	Wrong signature of def vote() in generic views	cmeter@…	nobody	"In the tutorial on Django v1.6 Part 4 you wrote in ""Amend Views"" (https://docs.djangoproject.com/en/1.6/intro/tutorial04/#amend-views) in the last block of code this line:
{{{
#!div style=""font-size: 80%""
  {{{#!python
  def vote(request, poll_id):
    ....
  }}}
}}}

But after changing to generic views, the method should look like this:

{{{
#!div style=""font-size: 80%""
  {{{#!python
  def vote(request, pk):
    p = get_object_or_404(Poll)
    ...
  }}}
}}}

Otherwise the poll application won't work and throws this error:

    TypeError at /polls/1/vote/
    vote() got an unexpected keyword argument 'pk'
    Request Method:	POST
    Request URL:	http://127.0.0.1:8000/polls/1/vote/
    Django Version:	1.6.5
    Exception Type:	TypeError
    Exception Value:	
    vote() got an unexpected keyword argument 'pk'
    Python Version:	3.4.1"	Bug	closed	Documentation	1.6	Normal	invalid			Unreviewed	0	0	0	0	0	0
