📜  遍历多个列表 django - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:57.588000             🧑  作者: Mango

代码示例1
#views.py
mylist = zip(list1, list2)
context = {
            'mylist': mylist,
        }
return render(request, 'template.html', context)
#in template file
{% for item1, item2 in mylist %}