def uninstall(portal, reinstall=False): if not reinstall: # Don't want to delete all registry values if a Manager simply reinstall the product from ZMI setup_tool = portal.portal_setup setup_tool.runAllImportStepsFromProfile( 'profile-collective.editablemenu:uninstall') logger.info("Uninstall done")
def from_1100_to_1200(context): """ delete old registry configuration and add a new one """ logger.info('Upgrading collective.editablemenu to version 1200') setup_tool = getToolByName(context, 'portal_setup') new_settings = generate_new_settings_for_1200() setup_tool.runImportStepFromProfile(default_profile, 'plone.app.registry') api.portal.set_registry_record(REGISTRY_NAME, new_settings)