[Twisted-Python] web.resource.Resource.putChild() problem

John Pote johnpote at jptechnical.co.uk
Thu Mar 15 13:08:10 MDT 2007


Hi, can someone help.

I've used the code snippet below to create a http control site for a web 
app. But I want to re-render the html pages from a sub dir, 
'controlSit/pp', so I figured putChild() would help.

def makeControlSite():
    site = static.File('controlSite')
    site.putChild('pp', ProcessPage())
    return site

So I set the app going with twistd and the site files, control/*.* and 
control/pp/*.* get returned to the browser as is. My ProcessPage() 
resource seems to be ignored.

Does static.File look for child resources or can I not mix static.File 
with putChild() as I've attempted to do?

Help appreciated,
John







More information about the Twisted-Python mailing list