【发布时间】:2015-08-26 12:29:10
【问题描述】:
在 django 中,在列表或数组上使用 for 循环的语法是:
{% for each in list %}
<td>{{ each }}</td>
{% endfor %}
如果我使用嵌套循环,则数据跨越多个列。
如何同时迭代两个或多个列表。我有 5 个列表要迭代。
例如在python中我可以使用类似的东西:
for x,y in zip(ls1, ls2):
#Do your work
【问题讨论】:
标签: python django django-templates