- Plone 3 Products Development Cookbook
- Juan Pablo Gimenez Marcos F.Romero
- 480字
- 2021-08-06 17:05:57
Creating a Plone site
We have no Plone site to play with yet (if you used the unified installer method, you should already have one though). A Plone site lives in the Zope Object Database (ZODB) and can be created by starting the instance and going through the Zope Management Interface (ZMI) (instructions for this a bit later). However, there is a better method to create a Plone site using the buildout automation process.
How to do it…
Edit buildout.cfg
and add [plonesite]
in the main parts
parameter:
[buildout]
parts =
zope2
productdistros
instance
zopepy
plonesite
...
And then add this new section at the bottom of the file:
[plonesite]
recipe = collective.recipe.plonesite
site-id = plone
instance = instance
Now we’re ready to rebuild and start the instance.
./bin/buildout ./bin/instance fg
Finally, on browsing to http://localhost:8080/plone
, you’ll see a Plone site.

How it works…
The new [plonesite]
part makes the buildout process run the collective.recipe.plonesite
recipe. With the correct parameters (site-id
, instance
, and some other ones that you might need), it will create or update a Plone site inside the Zope instance.
A particularly useful parameter is products
, which automatically installs a list of products when buildout
is run. We will use it in Opening an online Python shell on Plone using Clouseau.
For more information about this recipe and its options visit http://pypi.python.org/pypi/collective.recipe.plonesite.
There’s more…
As we said earlier, you can also create as many Plone sites as you need through the Web, that is to say, from the ZMI at the Zope root. This could be especially handy during development.
By going to http://localhost:8080/manage
, you will be asked to authenticate yourself. Use the admin
user you defined in the buildout.cfg
file.
Depending on your Plone version, you will use different methods to create a Plone site:
Up to version 3.x of Plone, pick the Plone Site option from the combo-box at the top-right corner, and then click on the Add button (or just leave the combo-box). Then fill the short form and submit your changes. A new Plone site will be created with the ID you have specified.

With Plone 4.x, there is a new Add Plone Site button at the top-right corner, above the combo-box we have just mentioned.

As mentioned at the beginning of this chapter, we’ll incorporate more configuration options to our buildout.cfg
as we create products in the project. So keep an eye open or just go to the Index of the book and look for “buildout” to go straight to them.
See also
- Opening an online Python shell on Plone using Clouseau
- Testing server load and benchmarking our code
- Installing and configuring an egg repository
- Alfresco Developer Guide
- Moldflow 2010完全自學與速查手冊(模流分析·成本控制)
- FreeSWITCH 1.0.6
- 微信小程序開發(fā)入門與實踐
- 視覺封王:Photoshop CC 2019立體化教程(素材+視頻+教案)
- 計算機·手機生活應(yīng)用
- ASP.NET jQuery Cookbook
- CorelDRAW 2020中文版入門、精通與實戰(zhàn)
- ASP.NET 3.5 Social Networking
- 詳解AutoCAD 2022室內(nèi)設(shè)計(第6版)
- Excel 2010 Financials Cookbook
- 中文版3ds Max 2014-VRay效果圖制作完全自學教程
- AutoCAD 2019中文版實戰(zhàn)從入門到精通
- Photoshop CC中文版基礎(chǔ)教程
- 零基礎(chǔ)學后期:Lightroom 6-CC數(shù)碼照片處理從新手到高手