修改view层:
mylist = zip(list1, list2)
return render_to_response('template.html', {'mylist': mylist})
template层:
{% for ab in mylist %}
{{a.0}}
{{b.1}}
{% endfor %}
修改view层:
mylist = zip(list1, list2)
return render_to_response('template.html', {'mylist': mylist})
template层:
{% for ab in mylist %}
{{a.0}}
{{b.1}}
{% endfor %}