Install dependencies
Up to Table of ContentsThis FAQ applies to: Any version.
This samplecode installs the products CMFMember and TeamSpace:
DEPENDENCIES = ['CMFMember', 'TeamSpace']
def installDependencies(self, out):
""" Install required products """
portal = getToolByName(self,'portal_url').getPortalObject()
qi = getToolByName(portal, 'portal_quickinstaller')
for product in DEPENDENCIES:
if not qi.isProductInstalled(product):
if qi.isProductInstallable(product):
qi.installProduct(product)
else:
raise "Product %s not installable" % product