[Twisted-web] Handling childs at Nevow

Michał Pasternak michal.dtz at gmail.com
Sat Jul 25 03:04:43 EDT 2009


See "childFactory" and "locateChild" methods of rend.Page 

BTW, are there any URL dispatchers (like the one Django has) out there for
Nevow?

-- 
M


-----Original Message-----
From: twisted-web-bounces at twistedmatrix.com
[mailto:twisted-web-bounces at twistedmatrix.com] On Behalf Of Juanjo Conti
Sent: Friday, July 24, 2009 11:50 PM
To: Twisted Web World
Subject: [Twisted-web] Handling childs at Nevow

At the moment I have this URL working

/

/ter

/graph

I have an IndexPage(LivePage) with its

    def child_ter(self, ctx):
        return TerPage()

    def child_graph(self, ctx):
        return GraphPage()

mehods.

TerPage() an GraphPage() pick the firs element of a global list and
show it in differents ways.

I'd like now to enalble urls like /ter/1, /ter/2, /ter/n so the n
element of the list is picked instead of the first one. How is the
correct way to make that argument reach TerPage and GraphPage
instances?

Greets!

-- 
Juanjo Conti

_______________________________________________
Twisted-web mailing list
Twisted-web at twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web




More information about the Twisted-web mailing list