django tutorial part 4: object_list() or object_list
|Reported by:||benthurgood||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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!
Change History (3)
Changed 8 years ago by benthurgood
comment:1 Changed 8 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