[Twisted-web] Web2 Script.py seems to be broken

Todd Thomas caliban19 at gmail.com
Wed Feb 8 14:40:00 MST 2006

On 2/8/06, David Reid <dreid at dreid.org> wrote:
> Todd Thomas wrote:
> > It does support wsgi, I was playing around with it. I went back to
> > twisted-web, I like its lower level approach. Using http.request
> > directly vs. resources is nice since I can pretty much tell exactly what
> > is going on. I love the fact that you can work at an extremely low level
> > in twisted-web. I hope twisted-web2 doesn't get too high level.
> I don't really understand this, twisted.web _has_ resources.  They're
> not very good in that one resource is expected to return another
> resource to consume the next segment in the path, which makes it hard to
> stop the machinery.  But if you mean what I think you mean (which I hope
> you don't) and that you're working with your own server.Site then I'd
> say you need twisted.web2 more than anyone, because it's resource api
> will allow you to make your framework work along side others.  Which is
> one of the problems with current Nevow and part of the reason
> twisted.web2 was started.
> -David
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
You just described exactly the problem I am currently having with
twisted-web2. I tried to create wsgi as a root resource, however its also
dependent on static files in media directory. I wasn't able to create a
child object due to no matter what it passes full path to the wsgi
application. So then I made it a child of a root resource, this sort of
worked. But since the root path was consumed when it is passed to the child
resource, when the application does a redirect, it creates the url in
relation to root, not the child url. In my own application I could work
around this without too much difficulty since I already know where my child
is in relation to the root object.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20060208/bf8a8144/attachment.htm

More information about the Twisted-web mailing list