On 8/24/07, Andreas Reuleaux <[EMAIL PROTECTED]> wrote:

> from zope.security.proxy import removeSecurityProxy
> price=removeSecurityProxy(proxiedPrice)

Yes, it works fine. Thanks.

However it would mean that I have to add a view class to all my
objects which contains a decimal attribute, and add
removeSecurityProxy to all decimal attributes that I wish to present
through the web? That would be too much unnecessary duplicate code,
since I am trying to build a web shop with Zope3, in which the decimal
type is almost everywhere.

I read in several places that the Security Proxy is supposed only to
wrap mutable objects. Integer and float for example shall not to be
proxied. But a decimal.Decimal is also immutable,  why is it  wrapped

Is there an easier way to go around this, like to tell security proxy
not to wrap all decimal objects?

Hong Yuan

Zope3-users mailing list

Reply via email to