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

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
主站蜘蛛池模板: 沅陵县| 调兵山市| 伊宁市| 南京市| 定安县| 凉城县| 河津市| 丘北县| 体育| 德兴市| 三江| 环江| 台安县| 呼玛县| 临汾市| 余干县| 香河县| 金湖县| 潮州市| 烟台市| 图们市| 普宁市| 怀宁县| 博野县| 治多县| 遂溪县| 四平市| 龙州县| 富民县| 安康市| 得荣县| 闸北区| 湖口县| 仪征市| 安乡县| 温泉县| 西丰县| 沭阳县| 舟山市| 顺平县| 阿克陶县|