Answers for "django template for loop two lists"

1

zip django template

mylist = zip(list1, list2)
context = {
            'mylist': mylist,
        }
return render(request, 'template.html', context)
Posted by: Guest on May-26-2020
0

iterate through multiple lists django

#views.py
mylist = zip(list1, list2)
context = {
            'mylist': mylist,
        }
return render(request, 'template.html', context)
#in template file
{% for item1, item2 in mylist %}
Posted by: Guest on September-20-2021
0

zip django template

{% for item1, item2 in mylist %}
Posted by: Guest on May-26-2020

Code answers related to "django template for loop two lists"

Python Answers by Framework

Browse Popular Code Answers by Language