[Twisted-web] page.Element render directives don't support arguments

Phil Mayers p.mayers at imperial.ac.uk
Tue Mar 20 18:09:26 CST 2007

So, on a rend.Page you can do:

   T.directive('field textbox dbcolumn1'),
   T.directive('field textarea dbcolumn2'),

def render_field(self, what):
    kind, dbcol = what.split(' ')
    return widgets[kind](value=self.dbrow[dbcol])

...however page.Element's "rendered" method doesn't see the spaces in 
the T.directive and instead looks for a render method called:

"field textbox dbcolumn1"

...which is not useful.

Intentional or just missed?

More information about the Twisted-web mailing list