How can I make this loop with Jinja2?

前端 未结 1 547
眼角桃花
眼角桃花 2021-01-12 12:31

With Jinja2, how can I make an iteration like the folllowing which works with django and not Jinja:

{% for key,value in location_map_india.items %}
{{value.n         


        
相关标签:
1条回答
  • 2021-01-12 13:01

    In Jinja2, functions and methods must be explicitly called.

    {% for key,value in location_map_india.items() %}
    {{value.name}}
    {% endfor %}
    
    0 讨论(0)
提交回复
热议问题