Changes between Initial Version and Version 1 of Ticket #33632


Ignore:
Timestamp:
Apr 10, 2022, 11:16:28 PM (23 months ago)
Author:
Mariusz Felisiak
Comment:

Hi, I don't think you've explained the issue in enough detail to confirm a bug in Django. Please reopen the ticket if you can debug your issue and provide details about why and where Django is at fault, or if you can provide a small project that reproduces this issue.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33632

    • Property Resolutionneedsinfo
    • Property Status newclosed
    • Property Summary Overwriting 'context_object_name' in list viewsOverwriting context_object_name in list views
  • Ticket #33632 – Description

    initial v1  
    11I 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{{{
    23    {% for service in services %}
    34        <p>
     
    89        </p>
    910    {% endfor %}
    10 
     11}}}
    1112I 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.
    1213
Back to Top