消毒一个plone站点以供makina corpus开发使用。
collective.generic.devmode的Python项目详细描述
Introduction
这提供了一个脚本cg.devmode,它可以对zope实例执行一些操作。
主要用途是在获取生产数据文件时,需要稍微清理一下内容。 清理包括一次更改所有密码和所有电子邮件。
另一个用途是在没有任何安全性的情况下运行脚本(我们只赋予我们所有权利;)
Actions & usage
Changing all email for all users:
./bin/cg.devmode -m --mail=some@mail.foo
Changing all passwords
./bin/cg.devmode -p --password=secret
Changing the administrator password
./bin/cg.devmode -a --password=secret
Running a script with all security stuff removed
./bin/cg.devmode -r --script=</path/to/file.py> [--script-args="String"] # equivalent of ./bin/instance run toto.py String except for security
Modifiers
Running with debug
./bin/cg.devmode -v [ARGS]
Giving an alternative zope configuration file
./bin/cg.devmode -c <CONFIGGILE>
Specifying the plone site id
./bin/cg.devmode -l <PLONE_SITE_ID>
Specifying the admin user
./bin/cg.devmode --user <ADMIN_USER>
collective.generic.devmode Installation
要将collective.generic.devmode安装到全局python环境(或workingenv)中, 使用传统的zope 2实例,您可以这样做:
When you’re reading this you have probably already run
``easy_install collective.generic.devmode``.Find out how to install setuptools (and EasyInstall) here: http://peak.telecommunity.com/DevCenter/EasyInstall
If you are using Zope 2.9 (not 2.10), get pythonproducts and install it via:
python setup.py install --home /path/to/instanceinto your Zope instance.
或者,如果您使用的是zc.buildout和plone.recipe.zope2instance 配方管理您的项目,您可以这样做:
Add ^{tt2}$ to the list of eggs to install, e.g.:
[buildout] parts= ... cg.devmode ... [cg.devmode] recipe=minitage.recipe.scripts eggs=${instance:eggs} collective.generic.devmode scripts=cg.devmode extra-paths = ${instance:extra-paths} # in an oldschool zope2 install, zope2home/lib/python must be in extra-paths!Re-run buildout, e.g. with:
$ ./bin/buildout