[Zope-dev] Catching "extra path"

Sandor Palfy netchan at cotse.net
Tue Mar 9 15:08:23 EST 2004


The question is, how can I do this from within a Python-based product?
Calling

    http://host/folder/object/method/a/b/c

fails to invoke the method 'method' on my custom object 'object'.
Instead, I get a "Cannot locate object" page.

-------------------

You can define a method in your 'object' object: "def
__bobo_traverse__(self, request, name)", which will be called on
traversal. 'name' is the name of the next element of the traversal path,
request['TraversalRequestNameStack'] is the remaining elemets of the
path.

Regards,
Sandor




More information about the Zope-Dev mailing list