# Copyright © 2004 Saugus.net, Inc. # All Rights Reserved. # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # Get the FactoryDispatcher. product=container.manage_addProduct['CMFDefault'] # Build the instance. product.addFile(id) # Fetch it, wrapped in container. item=getattr(container,id) # Perform other initialization. item.manage_addProperty('formatted_title','','string') item.manage_addProperty('long_description','','text') item.manage_addProperty('rank',0,'int') item.manage_addProperty('text','','text') item.manage_addProperty('terms',[],'lines') item.manage_addProperty('keywords',[],'lines') item.manage_addProperty('metas',[],'lines') item.manage_addProperty('cross_refs',[],'lines') item.manage_addProperty('html_allowed',1,'boolean') # Return it to the type object. return item