[Zope-CMF] Adding content type from python

Sam Brauer sam@webslingerz.com
Tue, 22 Jul 2003 11:42:29 -0400


Actually, that may need to be:

homeDir.invokeFactory('Image', 'image 1')




Sam Brauer wrote:
> Try the following Python code instead:
> 
> homeDir.invokeFactory('Portal Image', 'image 1')
> 
> 
> Glenn Pierce wrote:
> 
>> Hi
>>
>> 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. Upon closer inspection the Image icon as displayed
>> in the zope management interface is different than if I add a Portal
>> Image directly.
>>
>> I believe this must be a similiar problem to that of adding content to a
>> CMFDefault site from the zope interface.
>>
>> For example after creating a CMFDefault site you can add content though
>> the frontend fine. However if I try to add a piece of content from the
>> "CMFDefault Content" option of the zope management interface the content
>> does not seem to get created correctly and displays an incorrect icon.
>> I would very grateful for any help with either of these problems.
>>
>> Thank you
>>
>>
>> _______________________________________________
>> Zope-CMF maillist  -  Zope-CMF@zope.org
>> http://mail.zope.org/mailman/listinfo/zope-cmf
>>
>> See http://collector.zope.org/CMF for bug reports and feature requests
> 
> 
> 


-- 
Sam Brauer
Systems Programmer
sam@webslingerZ.com