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

Tres Seaver tseaver at zope.com
Mon Nov 29 10:21:36 EST 2004


Paul Winkler wrote:
> On Mon, Nov 29, 2004 at 03:52:48AM +0000, Chris Withers wrote:
> 
>>Index: Expression.py
>>===================================================================
>>--- Expression.py       (revision 1038)
>>+++ Expression.py       (working copy)
>>@@ -105,6 +105,7 @@
>>         'modules':      SecureModuleImporter,
>>         'member':       member,
>>         'here':         object,
>>+        'context':      object.aq_parent,
>>         }
>>     return getEngine().getContext(data)
>>
>>It means you can get access to the acquisition context of the current 
>>object in a nicely bound name, handy for doing things like:
>>
>>string:{context/absolute_url}/some_script_that_twiddles_folder_properties
>>
>>...in action expressions ;-)
>>
>>I'd like to apply it to the 1.5 branch and CVS head unless anyone has 
>>any objections?
> 
> 
> -1 for being inconsistent with Page Templates. In Page Templates, 
> "here" and "context" are bound to the same thing.
> 
> Maybe you could bind it to something like "parent" instead?

Agreed (-1 for 'context', +1 for another spelling).

Tres.
-- 
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com



More information about the Zope-CMF mailing list