[Zope] object properties access strangeness

Jonathan dev101 at magma.ca
Thu Oct 25 12:51:06 EDT 2007


----- Original Message ----- 
From: "Jaroslav Lukesh" <lukesh at seznam.cz>
To: <zope at zope.org>
Sent: Thursday, October 25, 2007 12:38 PM
Subject: [Zope] object properties access strangeness


> Hi all,
>
> I have problem with Zope 2.9.4, where I cannot get properties from 
> acquired DTML Document in same way as from Image (both are in folder 
> above, both objects with properties defined). It seems as to be a 
> permission problem, but I was look through permissions at whole tree up to 
> zope root.
>
> This is working:
>
>    <dtml-with picture.gif>
>        <dtml-var IMGproperty>(existing property at Image)
>    </dtml-with>
>
> And this raise error:
>
>    <dtml-with dtml_document_file>
>        <dtml-var ikona1>(existing property at DTML document)
>    </dtml-with>
>
> Error:
>
> Error Type: KeyError
> Error Value: 'ikona1'

Try:

<dtml-var "dtml_document_file.getProperty('ikona1', 'badPropertyName')">

Lots of good info in the PropertyManager appendix section of the ZopeBook...


Jonathan



More information about the Zope mailing list