1👍
✅
You can access the items with the .items()
method [python-doc]:
{% for key, value in show.episodes.items %} Season {{key}}: {{ value }} {% endfor %}
0👍
You can use {{key.0}}{{key.1}}
But for this you have to use list of tupples which is I think is a better option to use in django … Instead of dictionary
- [Answered ]-Django appending /None to url
- [Answered ]-How to get all my data from model to JSON? I need export and import my data
- [Answered ]-Django ~ WSGIRequest with a form added via get_context_data method
Source:stackexchange.com