Opened 16 years ago
Closed 16 years ago
#9069 closed (duplicate)
django tutorial part 4: object_list() or object_list
Reported by: | benthurgood | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.0 |
Severity: | Keywords: | object_list | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In the paragraph:
In previous parts of the tutorial, the templates have been provided with a context that contains the poll and latest_poll_list context variables. However, the generic views provide the variables object and object_list as context. Therefore, you need to change your templates to match the new context variables. Go through your templates, and modify any reference to latest_poll_list to object_list(), and change any reference to poll to object.
it suggests that latest_poll_list should be changed to object_list(), ending in parenthesis. This causes an error. When you drop the parenthesis and make it object_list it works fine.
Great tutorial btw!
Attachments (1)
Change History (3)
by , 16 years ago
Attachment: | Screenshot-TemplateSyntaxError at -polls- - Mozilla Firefox.png added |
---|
comment:1 by , 16 years ago
Summary: | object_list() or object_list → django tutorial part 4: object_list() or object_list |
---|
Screenshot of error when object_list() is used