[Zope-CMF] manage_addContent error

Florent Guillaume fg at nuxeo.com
Wed Oct 22 09:35:28 EDT 2003


In article <3F945675.9080504 at duke.edu> you write:
> Why do I get an attribute error when calling manage_addContent in a 
> python script? As far as I can tell, I'm doing the same thing as adding 
> CMFDefault Content from the ZMI.
> 
> If the script lives in Portal Folder 'foo', I should be able to create 
> in the folder a Portal File 'bar' thusly(?):
> 
> container.manage_addContent('bar', 'Portal File')

Note that the usual way to create content in CMF is through
invokeFactory:

  container.invokeFactory('File', 'bar')

(if 'File' is the portal type and 'bar' the id)

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg at nuxeo.com



More information about the Zope-CMF mailing list