jinjia2中for循环索引
在jinjia2中想直接用{% for i in n %}当前是第 x 条{% endfor %}是不行的。{% for i, val in enumerate(['a', 'b', 'c']) %} <td> {{ val }} </td>{% endfor %} 报错: UndefinedError: 'enumerate' is undefinedJinja2 has its own language. Looks li
转载
2021-09-03 10:37:25 ·
3236 阅读 ·
0 评论