[Twisted-web] CSS - locateChild

dsalvatore at freesurf.fr dsalvatore at freesurf.fr
Sat Nov 19 04:28:57 MST 2005


In the following example, without the 'locateChild'
the css style sheet is rendered, but not when I try
to uses locateChild.

Betwise, is this a good way to refresh a page using 'return self,()' ?

Thank you for your help


from twisted.application import service, internet
from nevow import loaders,rend,appserver,static

class Page(rend.Page):

    child_css = static.File('css')
    docFactory = loaders.xmlfile('xmlsite.xml')

    def render_left(self,context,data):
        return data

    def data_menu(self,context,data):
        return data

    def locateChild(self,context,data):
        return self,()

site = appserver.NevowSite(Page("TEST"))
application = service.Application('example')
internet.TCPServer(8080, site).setServiceParent(application)

More information about the Twisted-web mailing list