[Twisted-web] newbie: Stan syntax question

Mohamed Lrhazi mohamed at your-site.com
Tue Dec 14 14:22:14 MST 2004



--On Tuesday, December 14, 2004 11:00 PM +0200 Tommi Virtanen 
<tv at twistedmatrix.com> wrote:
> stanTag[foo] mutates the tag, adding foo as child. So something like..
>
> def render_tasks(self, context, data):               attrs = ['task_id',
> 'task', 'arguments']
>         mytable = T.table[T.tr[T.th["ID"],T.th["Task"],T.th["Arguments"]]]
>         for row in self.tasklist:
>             mytr = T.tr()
>             mytable[mytr]
>             for attr in attrs:
>                 mytr[T.td[row.get(attr)]]
>         return context.tag[mytable]
>
>

Not sure I understood (well, maybe)... but it sure worked!

Thanks a lot.

Mohamed~





More information about the Twisted-web mailing list