Code

Opened 7 years ago

Closed 7 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: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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

)

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by anonymous

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

why?

comment:2 Changed 7 years ago by korpios

  • Resolution invalid deleted
  • Status changed from closed to reopened

Anonymous users shouldn't be closing tickets.

comment:3 Changed 7 years ago by Simon G. <dev@…>

  • Resolution set to invalid
  • Status changed from reopened to closed
  • Summary changed from Bug in tut4 to The 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.

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.