[Twisted-web] Nevow - how to render sequence into 3 column table
Paul Reznicek
maillists at ivsn.com
Wed Dec 7 08:59:58 MST 2005
Hi all gurus,
have a list of dicts like:
data = [
{'name' : 'Alfred'}, {'age' : 15},
{'name' : 'Mary'}, {'age' : 17},
{'name' : 'Bob'}, {'age' : 25},
...
{'name' : 'Molly'}, {'age' : 22},
{'name' : 'Manfred'}, {'age' : 33},
]
!!! len(data)/3 is not a whole number !!!
The result should looks like:
<table>
<tr>
<td>Alfred is 15</td>
<td>Mary is 17</td>
<td>Bob is 25</td>
</tr>
...
<tr>
<td>Molly is 22</td>
<td>Manfred is 33</td>
</tr>
</table>
Is in Nevow a way how to render this automatically using
"pattern" for each cell ?
Thanks for help,
Paul
More information about the Twisted-web
mailing list