Changes between Initial Version and Version 1 of Ticket #33632
- Timestamp:
- Apr 10, 2022, 11:16:28 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33632
- Property Resolution → needsinfo
- Property Status new → closed
- Property Summary Overwriting 'context_object_name' in list views → Overwriting context_object_name in list views
-
Ticket #33632 – Description
initial v1 1 1 I have found that when I override the context object name in a ListView it is impossible for me to iterate correctly in a for loop in the template. For example, if I am writing a list view called 'Services' and override the context object name as 'services', using the for loop as follows: 2 {{{ 2 3 {% for service in services %} 3 4 <p> … … 8 9 </p> 9 10 {% endfor %} 10 11 }}} 11 12 I find that instead of iterating over the number of items that I have stored in the database, it does so over a crazy number of items that I don't know what they are related to. 12 13