Opened 16 years ago

Closed 16 years ago

#7253 closed (wontfix)

typo on http://www.djangoproject.com/documentation/tutorial04/ ?

Reported by: anonymous Owned by: nobody
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

Hello,

I got this error when following until tutorial04 :
=========================================
TypeError at /polls/1/vote/
vote() got an unexpected keyword argument 'poll_id'
...
=========================================

And finally point to this:
=========================================
Change it like so:

...
urlpatterns = patterns(,
...

(r'(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'),

)
=========================================

and after the <poll_id> into <object_id>
the error has disappeared.
So I think that should be a typo or mistyped.
Please ignore if it was not.

Change History (1)

comment:1 by Simon Greenhill, 16 years ago

Resolution: wontfix
Status: newclosed

I think what's happened is that you skipped the step changing the hand-written views into generic views (i.e. around line 199 we introduce generic views (which require <object_id>)).

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