DTL and Custom js not working together in Django

Question:

I have used multiple custom js in my project. It is working perfectly in simple HTML but when I tried to use that custom js in the Django DTL format for example

{% for data in data %} 
    'custom js' 
{% endfor %}

then it is not working and custom js is not loading.

Can anyone help? I am stuck here for so long now. I am not able to find any solution regarding this

Asked By: Helly Soni

||

Answers:

I got my solution. I use {{forloop.counter}} in every input element ID.

Answered By: Helly Soni
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.