[Product-Developers] Generic setup - plone.app.registry upgrade step after schema change

Christian Ledermann christian.ledermann at gmail.com
Thu May 5 06:29:20 UTC 2011


Hello,

How do i tell plone.app.registry to upgrade my schema in which i added a field.

http://plone.org/documentation/kb/how-to-create-a-plone-control-panel-with-plone.app.registry
is missing this information


the code:


def update_registry(context, logger=None):
    if logger is None:
        # Called as upgrade step: define our own logger.
        logger = logging.getLogger('collective.opensearch')
        logger.info("import regisitry setting")
    setup = getToolByName(context, 'portal_setup')
    setup.runImportStepFromProfile(PROFILE_ID, 'componentregistry')

(+ zcml:

 <!-- Register the upgrade step -->
  <genericsetup:upgradeStep
      title="Import registry - after schema  change"
      description=""
      source="1001"
      destination="1002"
      handler="collective.opensearch.setuphandlers.update_registry"
      profile="collective.opensearch:default" />



)

does not do the trick.





-- 
Best Regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 729495789

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>



More information about the Product-Developers mailing list