[Fixed]-Dynamically created accordions not functioning correctly in Django/python/html project

1👍

I don’t know what the @{int i=0;} is supposed to be doing, but you either need to use a for loop and look up a section using the index of that, or you can use the forloop counter, or just give the id’s a better name

id="accordion_{{ forloop.counter }}"
id="accordion_{{ forloop.counter0 }}"
id="accordion_{{ s.s_name }}"

Any should suffice.

👤Sayse

Leave a comment