[Zope] How to change default method for calling object from the
web?
Stefan H. Holek
stefan@epy.co.at
Wed, 05 Mar 2003 15:39:06 +0100
In the class of 'obj' define the method
def __browser_default__(self, REQUEST):
return self, ('view',)
HTH,
Stefan
--On Mittwoch, 05. M=E4rz 2003 13:26 +0100 Lubos Culen <mirsoft@gmx.net>=20
wrote:
> Hello!
>
> I have a problem:
>
> Let's assume I have object 'obj' and its method 'view' . So, calling the
> object 'obj' from web URL (e.g. 'www.mysite.com/path/obj' ) will display
> content of 'obj'. Calling 'www.mysite.com/path/obj/view' will call method
> 'view' of the object 'obj'.
>
> Now I want that the method 'view' should be DEFAULT method for the object
> 'obj', so calling 'www.mysite.com/path/obj' should automatically call the
> method 'view' of object 'obj'. Is it possible to do in Zope and how?
>
> --
> Regards, Mirsoft
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
--
Those who write software only for pay should go hurt some other field.
/Erik Naggum/