Opened 7 years ago

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

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by benthurgood

Screenshot of error when object_list() is used

comment:1 Changed 7 years ago by benthurgood

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from object_list() or object_list to django tutorial part 4: object_list() or object_list

comment:2 Changed 7 years ago by russellm

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #9059.

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