I am getting this error when I use any number with this also I have seen some solution on this site but I'm not able to solve or I am doing it in wrong way. A Help will be appreciated. THANKS
sample data of resend_lst: ['0', '1', '0', '0']
django.template.exceptions.TemplateSyntaxError: Could not parse the remainder: '[0]' from 'resend_lst[0]'
{% for attendee_data in attendees_data %}
<tr>
<td>{{ attendee_data.attendee.name }}</td>
<td>{{ attendee_data.attendee.email }}</td>
<td>{{ attendee_data.attendee.mobile }}</td>
<td>{{ attendee_data.attendee_response.date }}</td>
</tr>
**resend_lst is a list data type and I need to access this with its index in that loop **
{% if resend_lst[{{forloop.counter}}] == '0' %}
<style>
#response-{{forloop.counter}}{
display:none;
}
#cancel-{{forloop.counter}}{
display:none;
}
#loader-next-{{forloop.counter}}{
display:none;
}
#ajax-loader{
text-align: center;
width:19px;
height:19px;
}
</style>
{% else %}
<style>
#loader-next-{{forloop.counter}}{
display:none;
}
#ajax-loader{
text-align: center;
width:19px;
height:19px;
}
</style>
{% endif %}
<-- some task -->
{% endfor %}