I am passing a two dictionaries called student_ids and rows to a Django template. The dictionary student_ids has a key called student_id and invite_id and I would like to print out the student_ids[student_id] to get the invite_id.
The 4th element in row in rows dictionary is the same as student_id. When I try the code below, it doesn’t work…
Django template:
{% for row in rows %}
<a href="#invite"
data-invite="{{ invite_ids.row.4 }}">
{{ row.2 }}
</a>
{% endfor %}
What should I do to get the correct data out in the Django template? I essentially need student.ids[row[4]] to be printed out, and for it to be simple…
Solved it this way: