--On Freitag, 17. Jänner 2003 11:08 +0100 Webmaster Expert RH <webmaster@expert-rh.com> wrote:
if Note!='': author=context.REQUEST['AUTHENTICATED_USER'] id='%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=container.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 will need to do this: maNote = 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/