[Zope3-Users] Re: browser:form

Jeff Shell eucci.group at gmail.com
Thu Feb 23 13:11:36 EST 2006


On 2/22/06, suresh <suresh_vv at yahoo.com> wrote:
> Jeff Shell wrote:
> > On 2/21/06, David Johnson <djohnson at jsatech.com> wrote:
> > With formlib, you'd be able to get/set this in the update() method, or
> > if you're clever, you can do it in publishTraverse so you can have url
> > like '.../mycontacts/contact/1234'.
>
> Thanks for the mini-tutorial :)
>
> Will publishTraverse work with Five?

I'm not sure. I haven't used Five. But if it doesn't, you *should* be
able to get by with ``__bobo_traverse__``. I think the signature is
the same - accepts a request and a name, and should return a callable
or traversable object::

    def __bobo_traverse__(self, REQUEST, key):
        self.contactid = key
        return self

*Should* work if publishTraverse doesn't. But since publishTraverse is
a core protocol from zope.publisher, I would expect Five views to
support it.

--
Jeff Shell


More information about the Zope3-users mailing list