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

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
主站蜘蛛池模板: 民乐县| 宕昌县| 循化| 平果县| 乐山市| 永福县| 通辽市| 乌拉特中旗| 铜陵市| 襄汾县| 得荣县| 南投县| 焦作市| 静海县| 巴青县| 南宁市| 新乐市| 蚌埠市| 汨罗市| 罗甸县| 察隅县| 华亭县| 华池县| 铜川市| 夏河县| 黄陵县| 绥滨县| 永年县| 凌源市| 莆田市| 哈巴河县| 嘉定区| 明溪县| 邳州市| 汾阳市| 合水县| 定西市| 兴安县| 旌德县| 抚顺县| 凉山|