Opened 10 years ago

Closed 10 years ago

#12133 closed (invalid)

tutorial 4 - generic view and vote view

Reported by: dotdat Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Russell Keith-Magee)

In the last part of tutorial 4, it mention that in order to get the vote() view working, just change:

return HttpResponseRedirect(reverse('poll_results', args=(,))) 

However in the vote() view, the exception handling code also needs to change to reference the new poll_detail.html template and change poll object name 'poll' to 'object' since the poll_detail.html was changed to use the generic view.

This is more of a clarification and nothing really wrong with the tutorial.

Change History (1)

comment:1 Changed 10 years ago by Russell Keith-Magee

Description: modified (diff)
Resolution: invalid
Status: newclosed

Unless I'm misunderstanding you, this advice is already given in the paragraph before the one you reference:

The vote() view is still required. However, it must be modified to match the new context variables. In the render_to_response() call, rename the poll context variable to object.
Note: See TracTickets for help on using tickets.
Back to Top