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

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
主站蜘蛛池模板: 揭西县| 丰镇市| 丹棱县| 海伦市| 唐海县| 麦盖提县| 崇文区| 墨玉县| 喀喇| 深州市| 晋城| 陵水| 秦安县| 镇原县| 孟州市| 大荔县| 峡江县| 临安市| 桑日县| 会理县| 城口县| 南通市| 阳东县| 晋中市| 鹤庆县| 威海市| 文山县| 无棣县| 龙里县| 汤原县| 武川县| 武宁县| 天柱县| 文化| 延寿县| 凤翔县| 高碑店市| 连城县| 靖西县| 珠海市| 玛纳斯县|