Opened 15 years ago

Closed 15 years ago

#10940 closed (invalid)

Omission in tutorial, part 4: generic views

Reported by: zpearce Owned by: nobody
Component: Documentation Version: dev
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: no UI/UX: no

Description

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.

Original:

def vote(request, poll_id):
...snip...

Should be:

def vote(request, object_id):
...etc...

Change History (1)

comment:1 by Tim Graham, 15 years ago

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/$', 'mysite.polls.views.vote')

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