django - Looping over two lists in a template -


In a DJ ango template, I want to access elements in a list, while looping on elements in another list, I am passing the list mylist1 and mylist2 (the same number of both elements) in the template as the hidden variable, and give me the mylist1 element Display, and still display the related element of mylist2 This will look something like this:

My suggestion The results of 1%} {<%} & lt; P & gt; Results & lt; / P & gt; & Lt; P & gt; {{Mylist2.forloop.counter}} & lt; / P & gt; {% Endfor%}

What is the correct solution?


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -