灵巧的模板
templer.dexterit的Python项目详细描述
简介
灵巧是plone的一个内容类型开发工具。它支持 通过web和文件系统开发新的plone内容类型。 templer是一个python源包骨架的创建者。
dexterity提供了一种快速创建dexterity插件的机制。 骷髅。它还可以很容易地将新的内容类型添加到现有的内容类型中。 骷髅。使用此工具构建的新内容类型易于集成 对于类型,您可以使用Dexterity的TTW模式编辑器开发。
这是一个开发工具。你应该熟悉plone和buildout 用它。你应该已经在你的plone开发中安装了灵巧性 举例说明并准备好开始学习使用它。
安装
将这些行添加到buildout.cfg:
[buildout] parts = templer [templer] recipe = zc.recipe.egg eggs = PasteScript templer.core templer.zope templer.plone templer.dexterity ${instance:eggs}
其中instance是zope实例或zodb客户端的部件名。
运行Buildout。
用法
创建灵活的内容包,通常在构建的src中完成 目录:
../bin/templer dexterity
向现有包添加内容类型骨架:
cd yourbuildout/src/your-product/src ../../../bin/paster add content_type
添加行为骨架:
cd yourbuildout/src/your-product/src ../../../bin/paster add behavior
您必须将新项目添加到BuildOut并在之前运行BuildOut 向新包中添加内容类型或行为。
注释
鸡蛋目录
为了支持本地命令,Templer将创建Paste、PasteDeploy和 在你的产品中加入Pastescript鸡蛋。这些只是发展所需要的。 您可以也应该从加载项分发中删除它们。
同时删除:
setup_requires=["PasteScript"], paster_plugins=["templer.localcommands"],
从packages setup.py。
错误
如果您这样点击并出错:
pkg_resources.DistributionNotFound: plone.app.relationfield: Not Found for: my.product (did you run python setup.py develop?)
当尝试运行粘贴程序add时,需要确保 帕斯特知道你房子里所有相关的鸡蛋。
将${instance:eggs}添加到buildout中的粘贴程序的部分,thuly:
[templer] recipe = zc.recipe.egg eggs = ... ${instance:eggs} entry-points = paster=paste.script.command:run
其中,instance是您的plone.recipe.zope2instance节的名称。 重新运行构建,问题应该得到解决。
更改日志
1.0a1
- 主要来自zopeskel.dexterity;请参见该项目的存储库 早期的历史。 [smcmahon]