Opened 8 years ago

Closed 8 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: UI/UX:

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 8 years ago.
Screenshot of error when object_list() is used

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by benthurgood

Screenshot of error when object_list() is used

comment:1 Changed 8 years ago by benthurgood

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

comment:2 Changed 8 years ago by Russell Keith-Magee

Resolution: duplicate
Status: newclosed

Duplicate of #9059.

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