from Products.CMFCore.utils import ContentInit from Products.CMFCore.DirectoryView import registerDirectory from Products.Archetypes.public import listTypes from Products.Archetypes.public import process_types from Products.GenericSetup import EXTENSION from Products.GenericSetup import profile_registry from Products.CMFPlone.interfaces import IPloneSiteRoot from Products.Memories import config from Products.Memories import permissions from Products.validation import validation registerDirectory(config.SKINS_DIR, config.GLOBALS) def initialize(context): from Products.Memories import content content_types, constructors, ftis = process_types( listTypes(config.PROJECTNAME), config.PROJECTNAME) # Memories tool init import MemoriesTool tools = ( MemoriesTool.MemoriesTool,) from Products.CMFPlone.utils import ToolInit ToolInit('Plone Tool' , tools=tools , icon='tool.gif' ).initialize( context ) ContentInit( config.PROJECTNAME + ' Content', content_types = content_types, permission = permissions.ADD_CONTENT_PERMISSION, extra_constructors = constructors, fti = ftis, ).initialize(context) # Register the extension profile profile_registry.registerProfile('default', 'Memories', 'memories', 'profiles/default', 'Memories', EXTENSION, IPloneSiteRoot)