Re: [Twisted-Python] Basic Resource Tree question

2012-03-14 Thread Lusana Ali
That worked a charm and I feel the fool for not having noticed that simple error =) Much appreciated! Lusana On Wed, Mar 14, 2012 at 9:16 PM, Enrique Samson Jr, wrote: > On 03/14/2012 05:46 PM, Lusana Ali wrote: >> class Main(Resource): >> >>     def get_child(self, name, request): >>         pr

Re: [Twisted-Python] Basic Resource Tree question

2012-03-14 Thread Enrique Samson Jr,
On 03/14/2012 05:46 PM, Lusana Ali wrote: > class Main(Resource): > > def get_child(self, name, request): > print "trying to get main" > return IndexPage() Try changing get_child to getChild. --Enrique ___ Twisted-Python mailing lis

Re: [Twisted-Python] Basic Resource Tree question

2012-03-14 Thread Jasper St. Pierre
This probably isn't the proper way to do it, but it should work: root = resource.Resource() root.putChild('terms', Terms()) root.putChild('profile', Profile()) root.putChild('', IndexPage()) On Wed, Mar 14, 2012 at 5:46 AM, Lusana Ali wrote: > Hi, > > Im trying to setup just a ve

[Twisted-Python] Basic Resource Tree question

2012-03-14 Thread Lusana Ali
Hi, Im trying to setup just a very simple site using a Resource Tree (some code below). The problem I'm having is getting the root / to render. so when i go to domain.com/ I get "No Such Resource No such child resource" The child nodes {terms,profile} are rendering fine. So looking at the resourc