Back to index

plone3  3.1.7
__init__.py
Go to the documentation of this file.
00001 from Products.Archetypes.public import process_types, listTypes
00002 from Products.CMFCore import utils
00003 from config import SKINS_DIR, GLOBALS, PROJECTNAME, ADD_CONTENT_PERM
00004 from Products.CMFCore.DirectoryView import registerDirectory, registerFileExtension
00005 from Products.CMFCore.FSFile import FSFile
00006 
00007 __all__ = ()
00008 
00009 def initialize(context):
00010 
00011     # register directory views
00012     registerDirectory(SKINS_DIR, GLOBALS)
00013     
00014     # Register kss extension to allow it used from fs skins
00015     registerFileExtension('kss', FSFile)
00016 
00017     # content initialization
00018     content_types, constructors, ftis = process_types( 
00019         listTypes(PROJECTNAME),
00020         PROJECTNAME)
00021 
00022     utils.ContentInit(
00023         PROJECTNAME + ' Content',
00024         content_types = content_types,
00025         permission = ADD_CONTENT_PERM,
00026         extra_constructors = constructors,
00027         ).initialize(context)