[Zope] Error publishing resource

Garito garito at sistes.net
Mon Aug 30 06:02:43 EDT 2004


Johan "EasyPublisher" Carlsson wrote:

> Garito wrote:
>
>> Hi all
>>
>> I have some code like these:
>>
>> def __bobo_traverse__(self, REQUEST, name):
>>    obj = getattr(self, name, None)
>>        if obj is not None:
>>            return obj
>>        else:
>>            return 'cocohuaha'
>>
>> But zope raise an The object at http://myserver:8080/TestingZope/Test 
>> is not publishable.
>>
>> Why?
>
>
> __bobo_traverse__ returning a string instead of a publishable object.
> Replace 'cocohuaha' with a publishable object for which its
> index_html returns 'cocohuaha'.
>
> Johan
>
Hi Johan and Paul
I would __bobo_traverse__ returns a string instead an object because 
this function generates the response dynamically (is for that reason 
that the function returns a string)
How can I return a string? Do I need to create an object obligatorily?

Thank you!!!






More information about the Zope mailing list