I have list in a list that look like this :
clientList = [['Client 1', 'Yes', 'No', 'Yes', 'Yes'], ['Client 2', 'No', 'No', 'Yes', 'Yes'], ['Client 3', 'Yes', 'Yes', 'Yes', 'Yes']]
I need to call the list in the template dynamically as below
<table>
<tr>
{% for c in clientList %}
<td>{{c}}</td>
{% endfor %}
<tr>
<table>
But it doesn't work because it looks like this:
And I also can't loop it using the method {{c.0}}, {{c.1}}, {{c.3}}, {{c.4}}
because the list will change according to how many clients are selected. So I need to loop it dynamically.
I tried to use the method in this link but it didn't work because I kept getting the error list indices must be integers or slices, not str
Is there any way I can do this ?