[Twisted-Python] Resource Tree

Hi For example, as given in the howto to handle url path segment: root = Hello() root.putChild('fred', Hello()) root.putChild('bob', Hello()) Therefore, the following URLs are valid: http://example.com/ http://example.com/fred http://example.com/bob http://example.com/fred/ http://example.com/bob/ How do I handle non-existent url like http://example.com/foo? Liming

Afaik locateChild and getDynamicChild are intended for this. Also: class SomePage (Page): child_foo (self, context): return someFooResource child_bar (self, context): return someBarResource On Wed, 01 Sep 2004 09:19:08 +0800, Tsai Li Ming <mailinglist@ltsai.com> wrote:
Hi
For example, as given in the howto to handle url path segment: root = Hello() root.putChild('fred', Hello()) root.putChild('bob', Hello())
Therefore, the following URLs are valid: http://example.com/ http://example.com/fred http://example.com/bob http://example.com/fred/ http://example.com/bob/
How do I handle non-existent url like http://example.com/foo?
Liming
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- Jason

On Wed, Sep 01, 2004, Tsai Li Ming wrote:
How do I handle non-existent url like http://example.com/foo?
You want to ask web questions on http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web -Mary
participants (3)
-
Jason Mobarak
-
Mary Gardiner
-
Tsai Li Ming