[Zope] pb w/ manage_addProperty in DTML doc

Stefan H. Holek stefan@epy.co.at
Fri, 17 Jan 2003 11:40:35 +0100


--On Freitag, 17. J=E4nner 2003 11:08 +0100 Webmaster Expert RH=20
<webmaster@expert-rh.com> wrote:

> if Note!=3D'':
>    author=3Dcontext.REQUEST['AUTHENTICATED_USER']
>    id=3D'%s_%s' % (DateTime().strftime('%Y%m%d%H%M%S'),author)
># here I create a new DTML Document in the current container, title is
> author
>    =
maNote=3Dcontainer.manage_addProduct['OFSP'].manage_addDTMLDocument(id,
> author, Note)
># here I want to add a new property, I get a
># Error Type: AttributeError
># Error Value: manage_addProperty

manage_addDTMLMethod does *not* return the the newly created object. You=20
will need to do this:

maNote =3D container[id]

>    maNote.manage_addProperty('reviewed', 'false', 'boolean')
>
> return context.REQUEST.RESPONSE.redirect(context.REQUEST.HTTP_REFERER)

HTH,
Stefan

--
Those who write software only for pay should go hurt some other field.
/Erik Naggum/