On Tue, Sep 29, 2009 at 4:42 PM, William Stein <wst...@gmail.com> wrote: > > On Tue, Sep 29, 2009 at 4:41 PM, Alex Clemesha <cleme...@gmail.com> wrote: >> >> On Tue, Sep 29, 2009 at 8:26 AM, Mikie <thephantom6...@hotmail.com> wrote: >>> >>> Does anyone have an example of a twisted server that loads 2 html >>> pages from a url? --www.twisted.com:8000/page1/ , >>> www.twisted.com:8000/page2/ >>> Same port. >> Here are some very nice Twisted web tutorials: >> http://jcalderone.livejournal.com/tag/sixty+seconds >> >> You'll be able to figure out you above question, and more, >> pretty easily from them. Send another email if you're still having >> trouble after checking those out. >> >> >> -Alex >> > > Alex, how hard is it to migrate from "Twisted.web2" which is used in > Sage back to "Twisted.web"? Pretty easily actually... the Resource object is pretty similar, the main difference is that the Web2 Resource object has the "locateChild" method, where as the Web Resource has "getChild" - and even those are pretty similar.
Also, there's some subtle differences in the way you doing "rendering"... i.e. with Web2 you subclass Resource/PostableResource and then you use the "render" method, where are with Web you just subclass Resource and implemented either "render_GET" or "render_POST". Probably just looking through the examples here: http://jcalderone.livejournal.com/tag/sixty+seconds would be good enough to do the switch. The Web code is being actively maintained and improved... One major improvement that will being going into Twisted 9.0 (due tomorrow on the Twisted trac actually), is the nice WSGI support (for running Django, etc). In Codenode we use the trunk Web code, but in just a couple of days we will be able to remove all that code, and very cleanly run Django off a standard install of Twisted, which is extremely convenient. -Alex > > William > > > > -- Alex Clemesha clemesha.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---