31 Oct
2006
31 Oct
'06
1:12 p.m.
* kgi
However, if one has stan-based rather than file-based XHTML, it's neither documented nor obvious how this should be done. I've managed to get this far:
from nevow import stan ... _athena = stan.Proto ( 'athena:handler event="onkeypress" handler="keyPressed"' ) ... T.input ( type = "text", _class = "sw-input" ) [ _athena ]
stan.Proto takes a tag name, so you would really want just stan.Proto('athena:handler'). However, there's already one of these in athena, so you can just do: from nevow import stan, athena # ... T.input(type='text', _class='sw-input')[ athena.handler(event='onkeypress', handler='keypressed'] -- mithrandi, i Ainil en-Balandor, a faer Ambar