📜  循环迭代次数的模板 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:02.847000             🧑  作者: Mango

代码示例1
{% for item in item_list %}
    {{ forloop.counter }} # starting index 1
    {{ forloop.counter0 }} # starting index 0

    # do your stuff
{% endfor %}