[Twisted-web] getting started with nevow

Luc Saffre luc.saffre at gmx.net
Mon Nov 22 04:42:16 MST 2004

On 22.11.2004 12:55, Luc Saffre wrote:

> Sorry if I'm sticky, but can somebody give instructions about how I must 
> do to use nevow.appserver instead of twisted.web? 

Once again, maybe more concretely. I tried the following:

------- file nevow_webserver.py ---
from twisted.web import static
from twisted.application import service, internet
from nevow import appserver

root = static.File('../www')
application = service.Application('MyTwistedApp')
site = appserver.NevowSite(root)
webServer = internet.TCPServer(8080, site)

------- eof nevow_webserver.py ---

and I can run this script, using:
   twistd -ny nevow_webserver.py

It works, but the result is not as expected: The .rpy files are rendered 
without executing them. So static.File is obviously not what I must use 
as root resource.

Question: Which root resource is used when an application has been 
automatically built using "mktap web"? Can I use the same resource as 
root for a NevowSite? Or is there an equivalent Root resource that 
serves .rpy files?


More information about the Twisted-web mailing list