[Twisted-web] newbie question : first template
Thomas HERVE
therve at free.fr
Fri Apr 1 08:26:00 MST 2005
Quoting Sylvain de Tilly <sylvain.detilly at adelux.fr>:
> Hello,
>
> I'm just trying Nevow and I follow the BIG example page. But I'm blocked
> in the juste first test : print a string with the template. Here my
> code :
> [snip]
> Hello nevow... Could you see my <span nevow:data="test" /> ?
> </body>
> </html>
>
> [snip]
> class Page(rend.Page):
> addSlash=True
>
> docFactory = loaders.xmlfile('./htmlpage_first.html')
>
> def data_test( self, context, data ) :
> return "pattern"
Replace the <span nevow:data="test" /> by
<span nevow:data="test" nevow:render="data" />.
Some useful informations : http://srid.bsdnerds.org/hacking/nevowdoc/ (look at
XML templates).
--
Thomas
More information about the Twisted-web
mailing list