Opened 17 years ago

Closed 17 years ago

#5300 closed (invalid)

The last url pattern in Tutorial 4 should be object_id not poll_id

Reported by: anonymous Owned by: Jacob
Component: Documentation Version: dev
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 url pattern should be object_id not poll_id

urlpatterns = patterns(,

(r'$', 'django.views.generic.list_detail.object_list', info_dict),
(r'
(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', info_dict),
url(r'(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results.html'), 'poll_results'),
(r'
(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'), < ---* should be object_id

)

Change History (3)

comment:1 by anonymous, 17 years ago

Resolution: invalid
Status: newclosed

why?

comment:2 by korpios, 17 years ago

Resolution: invalid
Status: closedreopened

Anonymous users shouldn't be closing tickets.

comment:3 by Simon G. <dev@…>, 17 years ago

Resolution: invalid
Status: reopenedclosed
Summary: Bug in tut4The last url pattern in Tutorial 4 should be object_id not poll_id

Invalid: the only ones we've changed to generic views at that point in time are the first two url patterns. The third is still using mysite.polls.views.vote which IS expecting poll_id.

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