4 Mar
2000
4 Mar
'00
12:16 a.m.
I want to write an object that can be traversed by ZPublisher. The goal is so I can write URLs like thingyForwarder/45/display, to get an object corresponding to thingy #45, and call its display() method.
What's the Zope Zen way of doing this? Implement an __of__ method for acquisition? Implement a __bobo_traverse__ method? Make thingyForwarder a Folderish object and implement all the folder methods?
I think __bobo_traverse__ will do what you want. You can look at the local file system code in LocalFS.py as an example. -jfarr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hi! I'm a signature virus. Copy me into your .sig to join the fun! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~