Code

Opened 5 years ago

Closed 5 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:

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...

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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')

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.