[Zope] Add Property to Image with Form & Python?
Dieter Maurer
dieter at handshake.de
Sat Mar 27 05:52:46 EST 2004
Kevin Jones wrote at 2004-3-25 09:12 -0700:
> ...
>Question: I'm using a form to specify an Image and desired
>properties to upload. Then I use a Python script to do the actual
>_addImage and _addProperty. The _addImage works fine. But when
>I try to use the same script to add properties, I can't get it to
>work. The only object I can successfully add to is the image's
>parent folder...
What happens? Do you get an exception, when you try to add a property
to something else? Are the properties just added to the wrong object?
In the first case, we need to know "Error type", "Error value" and
traceback.
In the second case, you use "manage_addProperty" either for
the wrong object or for an object
that is not a "PropertyManager" ("Image" is one!). Zope's acquisition
will then find the nearest "PropertyManager" "above" this object
and uses its "manage_addProperty". This adds the property to
this "PropertyManager".
--
Dieter
More information about the Zope
mailing list