[Product-Developers] Python content type creation

Andreas Jung lists at zopyx.com
Fri Jul 10 15:44:37 UTC 2009


On 10.07.09 17:39, francoise wrote:
> Hello,
>
> Thanks to your help and to the following HowTo 
>      
> http://plone.org/products/scrawl/documentation/how-to/migrating-news-items-to-scrawl-blog-entries/
> Plone 3 python Content type creation become clearer.
>
> However, some things remain confusing.
>
> I can find the parameters specifics to each content type in their schema
> found in ATContentType/content
>
> I saw the Dublin Core schema in Archetypes/ExtensibleMetadata.py
>
> Just speaking of Dublin Core metadata, it seems that :
>   - some parameters can be set by invokeFactory() for some types
>   - some parameters can be set by item.update () for some types, e.g,
> "modification_date" can be set for Document but not for News and Events
>   - some parameters must be set by item.editMetadata() e.g "subject" for
> Events
>   - some parameters must be set using the setter, i.e
> item.setModificationDate() then item.indexObject() for News and Events
>
> How can I know for a metadata parameter which method I should use ?
>
> It seems the order of the call are important (after invokeFactory) :
>   1. call item.editMetadata()
>   2. call item.update()
>   3. call item.setter()
>   
This makes not much sense to me. You can set individual parameters why using
the auto-generated mutator methods (setXXXX) for each indiviual field.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20090710/f24f0ff8/attachment.vcf>


More information about the Product-Developers mailing list