Is there any get () function for this?
{% for key, value in choices.items %} <li>{{key}} - {{value}}</li> {% endfor %}
From python, I have a get () function to get values ββfrom a specific key. But I could not find an appropriate way to do this using django template tags. So I wonder if this is possible? I need to get specific values, as using loops adds a lot of new lines to the HTML source.
Or you should take care of the output inside the view before sending it to the template, which method is better?
source share