Hello.
This is about Python Django.
In the views.py file in the function, I pass the dictionary to the template:
array = {'Bob': 10, 'Alex': 12} In the pattern in the loop, I output this data like this:
{% for i in array %} {{ i }} {% endfor %} But this is how I get only the key: but I also need to get the value.
How can I do this? Indeed, in the template, the capabilities of the loop are very limited, and I cannot write this:
{% for i in array.items() %} ... There will be an error.
What to do?
Thank you in advance!