[Product-Developers] using a policy product to install (not get) add-ons

Kees Hink hink at gw20e.com
Fri Jan 22 10:41:28 UTC 2010


We all know how you can use a policy product to automatically get add-on
products and do basic site configuration. (1)

But how to actually install these products and configure them when the policy
product is installed?

Use case: I'd like to create a policy egg that will not only download but also
install a custom theme, Products.LinguaPlone and Products.Collage, and
afterwards i want to set up LinguaPlone's available languages. Perhaps I'd also
like to create translations for content that was added in the policy product's
'profiles/default/structure'.

Mu suggested approach: I was thinking about putting a setuphandlers.py in the
policy product, which installs the products programmatically, so i guess i can
use the quickinstaller tool for this, right? Or is there an easier/better way?

Kees

1) For the record: List them as dependencies in the policy product's setup.py.
If the dependency eggs are in the 'Products' namespace or use z3c.autoinclude
(in their setup.py), this will make them show up in Plone's add-on products
form (prefs_install_products_form).
https://weblion.psu.edu/trac/weblion/wiki/CreateYourOwnProduct#Creatingapolicyproduct
http://vilmos.somogyi.name/plone-tutorial-new-policy-product-with-paster/




More information about the Product-Developers mailing list