[Zope-CMF] Adding content type from python

Dieter Maurer dieter@handshake.de
Tue, 22 Jul 2003 23:37:02 +0200


Glenn Pierce wrote at 2003-7-22 16:27 +0100:
 > I have added a Portal Image from python to a memebrs home directory with
 > 
 > homeDir.manage_addProduct['CMFDefault'].manage_addContent(type='Portal
 > Image', id='image 1')
 > 
 > This adds the correct image and is viewable from the zope management
 > interface, however the image is not viewable in the folder contents view
 > of my page templates.

This is not the correct API level: Use "invokeFactory" or
"portal_types.constructContent", instead.


Dieter