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)

Screenshot-TemplateSyntaxError at -polls- - Mozilla Firefox.png (166.9 KB ) - added by benthurgood 16 years ago.
Screenshot of error when object_list() is used

Download all attachments as: .zip

Change History (3)

by benthurgood, 16 years ago

Screenshot of error when object_list() is used

comment:1 by benthurgood, 16 years ago

Summary: object_list() or object_listdjango tutorial part 4: object_list() or object_list

comment:2 by Russell Keith-Magee, 16 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #9059.

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