source: products/quintagroup.doublecolumndocument/trunk/quintagroup/doublecolumndocument/__init__.py @ 1552

Last change on this file since 1552 was 290, checked in by chervol, 18 years ago

import of Wolfgang Reutz changes

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1from zope.i18nmessageid import MessageFactory
2from quintagroup.doublecolumndocument import config
3
4from Products.Archetypes import atapi
5from Products.CMFCore import utils
6
7doublecolumndocumentMessageFactory = MessageFactory('quintagroup.doublecolumndocument')
8
9def initialize(context):
10    """Initializer called when used as a Zope 2 product.
11
12    This is referenced from configure.zcml. Regstrations as a "Zope 2 product"
13    is necessary for GenericSetup profiles to work, for example.
14
15    Here, we call the Archetypes machinery to register our content types
16    with Zope and the CMF.
17    """
18
19    import content
20
21    content_types, constructors, ftis = atapi.process_types(
22        atapi.listTypes(config.PROJECTNAME),
23        config.PROJECTNAME)
24
25    for atype, constructor in zip(content_types, constructors):
26        utils.ContentInit('%s: %s' % (config.PROJECTNAME, atype.portal_type),
27            content_types      = (atype,),
28            permission         = config.ADD_PERMISSIONS[atype.portal_type],
29            extra_constructors = (constructor,),
30            ).initialize(context)
Note: See TracBrowser for help on using the repository browser.