Hi Hugo, Your template code, does it actually contains <table> and </table> ? Like below?
<table> {% for row in rows %} <tr> {% for value in row %} <td>{{ value }}</td> {% endfor %} </tr> {% endfor %} </table> Then, what does rows look like? Can you post your output please? To get this output, for example, use "print rows" before you render the template, and post the result here. That would help! Wim On Sep 27, 6:37 pm, jhugo <jhmur...@gmail.com> wrote: > What i want to display as a table is the fallowing: > > rows---row--- row ---row > | | | > number1 name1 date1 > number2 name2 date2 > number3 name3 date3 > > Now when django renders my template i get this: > > number1 name1 date1 > number1 name1 date1 number2 name2 date2 > number1 name1 date1 number2 name2 date2 number3 name3 date3 > > Is this better? I am not getting why i am getting this behavior? > > On Sep 27, 5:48 am, Léon Dignòn <leon.dig...@gmail.com> wrote: > > > Could you post your list and your output please? > > > On Sep 27, 2:04 am, jhugo <jhmur...@gmail.com> wrote: > > > > Hi, > > > > I want to render a table using a list of list. What I do is create a > > > list for the rows and append another list for the columns. I use two > > > fors in my template to render the table and as the first loop progress > > > the second always renders the values from the beginning and a i end up > > > having my rows incrementing in length. Why is this? > > > > this is what i have: > > > > {% for row in rows %} > > > <tr> > > > {% for value in row %} > > > <td>{{ value }}</td> > > > {% endfor %} > > > </tr> > > > {% endfor %} > > > > Thanks, > > > > -- Hugo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---