All pastes #353738 Raw Edit

Miscellany

public python v1 · immutable
·published 2007-02-13 15:33 UTC
rendered paste body
freebsd# cat __init__.pyfrom Products.Archetypes.atapi import process_types, listTypesfrom Products.CMFCore import utilsfrom Products.CMFCore.DirectoryView import registerDirectoryfrom Products.Escola.config import SKINS_DIR, GLOBALS, PROJECTNAMEregisterDirectory(SKINS_DIR, GLOBALS)def initialize(context):    from content import * # importa todos os modulos do diretorio content    content_types, constructors, ftis = process_types(        listTypes(PROJECTNAME),        PROJECTNAME)    allTypes = zip(content_types, constructors)    for atype, constructor in allTypes:        kind = "%s: %s" % (PROJECTNAME, atype.portal_type)        utils.ContentInit(kind,                          content_types      = (atype,),                          extra_constructors = (constructor,),                          fti                = ftis,                          ).initialize(context)freebsd#