Wednesday, 15 August 2012

html - Jinja2 Accessing an specific index in List of Lists -


I'm new to Jinja and Python and I'm having trouble printing my table. I had to prepare this work and table (though it would not always remember the index).

  & lt; Table & gt; {% Table in% for}} & lt; Tr & gt; {% Line in line%} & lt; Td> {{Cell}} & lt; / Td> {% Endfor%} & lt; / Tr & gt; {% Endfor%} & lt; / Table & gt;  

But I want to do something like this so that I can apply individual attributes on different columns. There will be a column link, a blue, etc. Although this code is empty I & lt; Td> & Lt; / Td> Gives a bunch of lines. Is not I using the index properly?

  & lt; Table & gt; {% Table in% for}} & lt; Tr & gt; & Lt; Td> {{Line [0]}} & lt; / Td> & Lt; Td> {{Line [1]}} & lt; / Td> & Lt; Td> {{Line [2]}} & lt; / Td> & Lt; Td> {{Line [3]}} & lt; / Td> & Lt; Td> {{Line [4]}} & lt; / Td> & Lt; Td> {{Line [5]}} & lt; / Td> & Lt; Td> {{Line [6]}} & lt; / Td> & Lt; Td> {{Line [7]}} & lt; / Td> & Lt; Td> {{Line [8]}} & lt; / Td> & Lt; / TR & gt; {% Endfor%} & lt; / Table & gt;  


No comments:

Post a Comment