Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想像这样在 django 模板中实现
对于范围内的我(0,10): 对于范围内的 j(0,10): 如果(i.index == j.index): 打印(j)
我已经用这个解决了我的问题。谢谢。
{% if forloop.counter == forloop.parentloop.counter %}