[Answer]-How to iterate over a python dictionary in django template

1👍

chartData is a list of tuples, not a dict. You need something like this in your template:

{% for row in chartData %}
    console.log("{{ row.0 }}", "{{ row.1 }}");
{% endfor %}

0👍

For your second question, try:

alert('{{  value  }}');

Leave a comment