#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 , 17 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:2 by , 17 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.
Duplicate of #7253 and #5300