Maurits van Rees, on 2007-05-11:
> Extensions/install.py could have something like this:
>
> from Products.collective.generations import UpgradeManager
> from Products.collective.generations import SchemaManager
>
> sm = SchemaManager(
> minimum_generation = 0,
> generation = 5,
> package_name = 'Products.eXtremeManagement'
> )
>
>
> def install(context):
> um = UpgradeManager(context) # or getUtility/getToolByName
> um.install(sm)
Insert "um.setup(sm)" before the last line.
The setup methode is defined like this:
def setup(self, manager):
"""Setup generations for this manager.
Mostly: insert the generations property
"""
generations = self.props.getProperty(manager.package_name)
if generations is None:
self.props.manage_addProperty(manager.package_name, 0, 'int')
--
Maurits van Rees | http://maurits.vanrees.org/ [NL]
Work | http://zestsoftware.nl/
"Do not worry about your difficulties in computers,
I can assure you mine are still greater."
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers