[Zope] help with __bobo_traverse__

Mohamed Lrhazi mohamed at your-site.com
Thu May 27 13:26:34 EDT 2004

--On Thursday, May 27, 2004 12:13 PM -0500 sathya <sathya at zeomega.com> 
> at first glance
> it seems like your python code is not indented properly
> ur return statement is not within the if block

The copy/paste into my mail client screwed it up a bit. but it is correct:

Here it is better indented:

  def __bobo_traverse__(self,REQUEST=None,NAME=None):
	if NAME == 'foobar':
		#gettattr_str = str(getattr(self, 'viewDomain'))
		#self_str = str(self)
		#err_str = "gettattr_str:%s \n self_str:%s"%(gettattr_str,self_str)
		#raise 'Ooops', err_str
		return getattr(self, 'viewDomain')
		# probably from unrestrictedTraverse
		return getattr(self, NAME)

One more thing, this works as expected:


Meaning that is does call my viewDomain method which displays the REQUEST 

But this fails:



Zope has encountered a problem publishing your object.
Cannot locate object at:

More information about the Zope mailing list