Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#10294 closed (duplicate)

Tutorial 4 uses incorrect variable

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

Description

I could also be doing something wrong here, but it looks like a line in the section where you create generic views is incorrect. Here's the current line:

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

It seems to me that the poll_id should have been changed to object_id. I'm brand new to Python (and Django), so I'm not certain that's the complete solution, but it seemed to fix the generic views problems I had. (Also, sorry I didn't attach a patch even though it seems simple to me; very overwhelmed first-timer here.)

Change History (2)

comment:1 by dc, 16 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #7253 and #5300

comment:2 by nic, 16 years ago

If this is a duplicate, should the documentation make this more explicit? When you copy over the new views and change the IDs to object-related names for the generic view, you do get the type error described in #7253. Clearer documentation (or perhaps a tarball with the final code for comparison) would do much to help, especially for a beginner's tutorial.

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