source: products/quintagroup.ploneformgen.readonlystringfield/trunk/quintagroup/ploneformgen/readonlystringfield/__init__.py @ 826

Last change on this file since 826 was 322, checked in by piv, 16 years ago

initial import

  • Property svn:eol-style set to native
File size: 819 bytes
Line 
1from zope.i18nmessageid import MessageFactory
2
3from Products.Archetypes import atapi
4from Products.CMFCore import utils
5
6import config
7
8readonlyStringFieldMessageFactory = MessageFactory('quintagroup.ploneformgen.readonlystringfield')
9
10def initialize(context):
11    """Initializer called when used as a Zope 2 product."""
12
13    import field
14
15    content_types, constructors, ftis = atapi.process_types(
16        atapi.listTypes(config.PROJECTNAME),
17        config.PROJECTNAME)
18
19    for atype, constructor in zip(content_types, constructors):
20        utils.ContentInit('%s: %s' % (config.PROJECTNAME, atype.portal_type),
21            content_types      = (atype,),
22            permission         = config.ADD_PERMISSIONS[atype.portal_type],
23            extra_constructors = (constructor,),
24            ).initialize(context)
Note: See TracBrowser for help on using the repository browser.