[Zope-CMF] is this tiny patch to CMFCore/Expression.py okay?

Chris Withers chris at simplistix.co.uk
Sat Dec 4 12:52:54 EST 2004


Okay, attempt number 2:

Chris Withers wrote:

> Index: Expression.py
> ===================================================================
> --- Expression.py       (revision 1038)
> +++ Expression.py       (working copy)
> @@ -105,6 +105,7 @@
>          'modules':      SecureModuleImporter,
>          'member':       member,
>          'here':         object,
> +        'parent':       aq_parent(object),
>          }
>      return getEngine().getContext(data)

As for Dieter's points 2 & 3, Florent actually answered both of those 
;-)  The Acquisition.aq_parent function isn't available in expressions. 
I think the closest you can get is "object.aq_parent or object", but is 
that enough?

Florent suggested aq_parent(aq_inner(object)), but I think that's 
already available through the name 'folder'.

Anyone got any more points before I commit?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope-CMF mailing list