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
Answers:
I got my solution. I use {{forloop.counter}} in every input element ID.
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
I got my solution. I use {{forloop.counter}} in every input element ID.