[Zope-dev] ZPublisher Q about obj having both __bobo_traverse__ and
index_html
Michael Olivier
michael@baac.net
Sun, 23 Dec 2001 22:18:32 -0800
I'm using ZPublisher + PCGI w/o the full Zope environment. Is it possible
to have an object that defines a __bobo_traverse__ method and also has an
index_html method? In the example below, I would want it to traverse if
the URL path had more elements on it, and otherwise to call
index_html(). Unless I comment out the __bobo_traverse__, the index_html
method doesn't work. I also tried returning None in traversal if key was
None, but that didn't work either. (I am running 2.0.1, so maybe I'm
hitting a bug that's since been fixed.)
class MsgDirList:
"""message directory list"""
def __init__(self):
pass
def __bobo_traverse__(self, REQUEST, key):
# traverse if there is more in the URL path...
return CitiesMsgs(key)
def index_html(self):
"""hi there"""
return "hi there!"
Also, is there a more focused group for those of us using ZPublisher + PCGI
(or whatever) w/o using the full Zope environment? Or if not, email me if
you'd be interested in such a forum. Most of the traffic on zope-dev is
off the mark for me.
thanks!
Michael