#$Id$ ############################################################################# # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################## from Products.Archetypes.public import process_types, listTypes from Products.CMFCore import utils from Products.CMFCore.DirectoryView import registerDirectory from permissions import initialize as initialize_permissions from config import * ##Import tools and utilities here registerDirectory(SKINS_DIR, GLOBALS) def initialize(context): ##Import Types here to register them import content content_types, constructors, ftis = process_types( listTypes(PROJECTNAME), PROJECTNAME) permissions = initialize_permissions() allTypes = zip(content_types, constructors) for atype, constructor in allTypes: kind = "%s: %s" % (config.PROJECTNAME, atype.archetype_name) utils.ContentInit( kind, content_types = (atype,), permission = permissions[atype.portal_type], extra_constructors = (constructor,), fti = ftis, ).initialize(context)