How to make a for loop in Jinja?

烂漫一生 提交于 2019-12-23 06:56:36

问题


I want to make a for-loop that goes from 0 to 10 in Jinja.

How do I do it?
All I know to do is the advanced for, but this does not help me now.


回答1:


do something like this...

{% for i in range(11) %}
 {{ i }}
{% endfor %}

Edited the endfor.

Hope this helps!



来源:https://stackoverflow.com/questions/29706099/how-to-make-a-for-loop-in-jinja

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!