Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

zope.proxy

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


optilude+lists at gmail

Jun 26, 2009, 3:30 AM

Post #1 of 5 (481 views)
Permalink
zope.proxy

Hi,

Is there any documentation on zope.proxy other than the test? I don't
speak C anymore. :)

Basically, I'm curious if it would be possible to implement "translation
proxies" that would allow getting and setting translated values for
certain fields.

Cheers,
Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


mborch at gmail

Jun 26, 2009, 3:58 AM

Post #2 of 5 (439 views)
Permalink
Re: zope.proxy [In reply to]

Martin Aspeli wrote:
> Is there any documentation on zope.proxy other than the test? I don't
> speak C anymore. :)

I find ``zope.location.location.LocationProxy`` to be a good example of
its usage.

\malthe

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


mborch at gmail

Jun 26, 2009, 3:58 AM

Post #3 of 5 (442 views)
Permalink
Re: zope.proxy [In reply to]

Martin Aspeli wrote:
> Is there any documentation on zope.proxy other than the test? I don't
> speak C anymore. :)

I find ``zope.location.location.LocationProxy`` to be a good example of
its usage.

\malthe

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


ct at gocept

Jun 26, 2009, 7:34 AM

Post #4 of 5 (444 views)
Permalink
Re: zope.proxy [In reply to]

Hi there,

On Fri, 2009-06-26 at 18:30 +0800, Martin Aspeli wrote:
> Hi,
>
> Is there any documentation on zope.proxy other than the test? I don't
> speak C anymore. :)
>
> Basically, I'm curious if it would be possible to implement "translation
> proxies" that would allow getting and setting translated values for
> certain fields.

I have done something like this a while ago and always wanted to release
it.

*digs into svn*

Ah. We didn't use zope.proxy at all. We differentiate between a "real"
object and the object that carries the schema's translated fields.

Have a look at the attached file, it contains the code that I extracted
from a project in a hurry, but if the approach sounds reasonable to you,
I'd be happy to put that into SVN.

Christian

--
Christian Theune · ct[at]gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development
Attachments: gocept.schematranslation.tar.gz (2.39 KB)
  signature.asc (0.19 KB)


optilude+lists at gmail

Jun 26, 2009, 8:38 AM

Post #5 of 5 (438 views)
Permalink
Re: zope.proxy [In reply to]

Hi Christian,

Thanks for this!

> Have a look at the attached file, it contains the code that I extracted
> from a project in a hurry, but if the approach sounds reasonable to you,
> I'd be happy to put that into SVN.

Can you tell me a bit more about how this is hooked into publication?
Where do you create the Translation object? How do you look up
translations later and present the correct translation to users?

Cheers,
Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.