Last change
on this file since 826 was
322,
checked in by piv, 18 years ago
|
initial import
|
-
Property svn:eol-style set to
native
|
File size:
819 bytes
|
Rev | Line | |
---|
[322] | 1 | from zope.i18nmessageid import MessageFactory |
---|
| 2 | |
---|
| 3 | from Products.Archetypes import atapi |
---|
| 4 | from Products.CMFCore import utils |
---|
| 5 | |
---|
| 6 | import config |
---|
| 7 | |
---|
| 8 | readonlyStringFieldMessageFactory = MessageFactory('quintagroup.ploneformgen.readonlystringfield') |
---|
| 9 | |
---|
| 10 | def 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.