模板的for循环中,如何获取序号?

想过用enumerate,但是在模板中会报错 Could not parse the remainder xxx;

后来搜到 forloop.counter,完美解决

参考:http://www.cnblogs.com/chenkeven/articles/9340961.html

posted on 2018-11-12 20:41  蛋尼  阅读(2766)  评论(0编辑  收藏  举报