23 Aug
2011
23 Aug
'11
12:34 p.m.
Hello, I'm still trying to figure out what is the correct way to render data in a template that comes from a list, e.g. to produce a table. I have figured out a way, but I got no idea if that's the way to go: <table> <tr t:render="table_row"><td><t:slot name="table_content" /></td></tr> </table> with that renderer: @renderer def table_row(self, request, tag): rows = ["A", "B", "C"] output_list = [] for row in rows: t = tag.clone() t.fillSlots(table_content=row) output_list.append(t) return output_list Is that how it should be done in twisted templating? Thanks, Florian