官术网_书友最值得收藏!

Automatically installing products in your Zope instance

When working on a project like ours, you will find it very useful to automatically install some products in your Zope instance at buildout time.

How to do it…

  1. If not done yet, add a new line in the parts definition at the top of buildout.cfg to tell buildout to create a Plone site automatically:
    [buildout]
    
    ...
    
    parts = 
    
    ...
    
     plonesite
    
  2. And then add a new [plonesite] part at the bottom of the file:
    [plonesite]
    recipe = collective.recipe.plonesite
    site-id = plone
    instance = instance
    products = 
     Products.poxContentTypes
    
  3. Don't forget to build your instance and launch it once more.
    ./bin/buildout
    ./bin/instance fg
    

How it works…

The recipe used in [plonesite] part here — collective.recipe.plonesite — will create or update a new Plone site when the buildout is run. In addition, if any product is specified in the products parameter, it will be automatically installed.

Once your Zope instance is up, you can open your Plone home page and click on the Add new drop-down menu. By clicking on the XNewsItem option, a new form should open as shown in the following screenshot:

How it works…

There's more…

You also have the option to install products manually:

  1. Log into your Plone site as admin user.
  2. Click on the Site Setup link on the top-right corner and then click on the Add-on Products link, or just go to http://localhost:8080/Plone/prefs_install_products_form.
  3. In the Add/Remove Products page, select poxContentTypes in the Products available for install list and press the Install button below.

See also

  • Creating a Plone site
  • Opening an online Python shell on Plone using Clouseau
  • Creating a policy product
  • Installing and configuring an egg repository
主站蜘蛛池模板: 赤峰市| 正阳县| 当涂县| 宜州市| 宿松县| 庆阳市| 海伦市| 错那县| 牡丹江市| 隆德县| 静安区| 奉节县| 冀州市| 社旗县| 武威市| 龙江县| 京山县| 南岸区| 习水县| 天峻县| 平山县| 上思县| 松潘县| 拜城县| 米脂县| 喀喇沁旗| 寿宁县| 曲沃县| 漾濞| 怀柔区| 繁峙县| 吴堡县| 利津县| 大丰市| 榆社县| 甘洛县| 陕西省| 年辖:市辖区| 西盟| 德保县| 平湖市|