django for 循环中,获取序号

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

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

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

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

原文地址:https://www.cnblogs.com/dannyyao/p/9948910.html