How can I make this loop with Jinja2?

前端 未结 1 539
眼角桃花
眼角桃花 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)
提交回复
热议问题