Opened 9 years ago

Closed 9 years ago

#10940 closed (invalid)

Omission in tutorial, part 4: generic views

Reported by: zpearce Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: tutorial, generic view, object_id
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


When refactoring the poll app for generic views, no mention is made of the need to change one of the parameters passed into the vote() view from poll_id to object_id.


def vote(request, poll_id):

Should be:

def vote(request, object_id):

Change History (1)

comment:1 Changed 9 years ago by Tim Graham

Resolution: invalid
Status: newclosed

This is not necessary since vote is not a generic view. Notice that the URLconf keeps the poll_id variable:

(r'^(?P<poll_id>\d+)/vote/$', '')

Note: See TracTickets for help on using tickets.
Back to Top