2012-08-12 76 views
1

我有一个非常令人沮丧的开始学习Plone开发。我想为Plone 4开发一个基于灵活性的内容类型。我是一名经验丰富的Python开发人员,对Zope和Grok有一定的了解,对于构建而言是相当新颖的。也就是说,我读了Martin Aspeli的“专业Plone 4开发”,但书中的一些版本信息似乎已经过时了。为plone实现一个简单灵活的内容类型4

使用buildout我能够启动并运行Plone实例。的ZopeSkel安装,但是当我尝试创建一个新的包,我得到这样一个错误:

************************************************************************** 
** Your new package supports local commands. To access them, change 
** directories into the 'src' directory inside your new package. 
** From there, you will be able to run the command `paster add 
** --list` to see the local commands available for this package. 
************************************************************************** 


ERROR: No egg-info directory found (looked in ./domma.voucher/./domma.voucher.egg-info, ./domma.voucher/bootstrap.py/domma.voucher.egg-info, ./domma.voucher/bootstrap.pyo/domma.voucher.egg-info, ./domma.voucher/buildout.cfg/domma.voucher.egg-info, ./domma.voucher/CHANGES.txt/domma.voucher.egg-info, ./domma.voucher/CONTRIBUTORS.txt/domma.voucher.egg-info, ./domma.voucher/docs/domma.voucher.egg-info, ./domma.voucher/domma/domma.voucher.egg-info, ./domma.voucher/README.txt/domma.voucher.egg-info, ./domma.voucher/setup.cfg/domma.voucher.egg-info, ./domma.voucher/setup.py/domma.voucher.egg-info, ./domma.voucher/src/domma.voucher.egg-info) 

如果我尝试从给定的目录中运行贴纸,它告诉我,该命令“添加”是不知道。我尝试了ZopeSkel的不同版本,尝试了原始的plone模板和zopeskel.dexterity。输出根据版本和模板而稍有变化,但结果保持不变。

Obvisouly Plone开发似乎对版本更改非常明智,这使得旧的文档相当无用。 http://plone.org/products/dexterity/documentation/manual/developer-manual告诉我,它已在1114前上次更新。

有人能给我一个出发点,为Plone 4开发一个非常简单的灵巧内容类型,它真的有效吗?

+0

您是否正在使用您正在运行正确的ZopeSkel版本? – 2012-08-12 17:44:54

回答

3

对于什么是值得的,虽然有一些包的几个较新版本,专业Plone 4开发目前与Plone 4.1。我建议你使用它,并从它的示例代码开始。除非你知道你有一个工作的起点,否则不要试图任意升级,你应该没问题。

+0

这是一个版本问题,但是非常愚蠢:我使用Python 2.7而不是2.6。似乎会导致各种奇怪的错误。我切换到2.6,现在一切都看起来好多了。我会尽力继续我的旅程。对不起,这完全是我的错! – Achim 2012-08-21 06:16:12

2

http://pigeonflight.blogspot.com/2012/01/dexterity-development-quickstart-using.html提供了一个很好的快速入门。最新的敏捷文档在http://dexterity-developer-manual.readthedocs.org/en/latest/index.html。是的,这仅仅是一个移动目标,而不是文件上的原因,而不是由于敏捷性,这是稳定的和在生产中,但主要是因为Zopeskel正在大力发展/现代化。对于那个很抱歉。

+1

即使某些页面在一段时间内没有更新,敏捷手册也不会过时,因为它是值得的。 – optilude 2012-08-12 16:05:43

+0

截至目前,http://dexterity-developer-manual.readthedocs.org/en/latest/index.html链接不再有效;目前,敏捷开发者手册是[here](https://docs.plone.org/external/plone.app.dexterity/docs)([Plone 4版本](https://docs.plone.org/4/ en/external/plone.app.dexterity/docs)) – Tobias 2017-11-09 08:55:38

1

我能够使用这个扩展创建一个新的灵巧内容类型的新Plone 4.1.4网站。这不应该是一个正式的答案,但将配置粘贴到像pastebin这样的易失性服务不是永久性文档的选项。

# buildout.cfg file for Plone 4 development work 
# - for production installations please use http://plone.org/download 
# Each part has more information about its recipe on PyPi 
# http://pypi.python.org/pypi 
# ... just reach by the recipe name 
[buildout] 
parts = 
    instance 
    zopepy 
    i18ndude 
    zopeskel 
    test 
# omelette 

extends = 
    http://dist.plone.org/release/4.1-latest/versions.cfg 
    http://good-py.appspot.com/release/dexterity/1.2.1?plone=4.1.4 

# Add additional egg download sources here. dist.plone.org contains archives 
# of Plone packages. 
find-links = 
    http://dist.plone.org/release/4.1-latest 
    http://dist.plone.org/thirdparty 

extensions = 
    mr.developer 
    buildout.dumppickedversions 

sources = sources 

versions = versions 

auto-checkout = 
    nva.borrow 

# Create bin/instance command to manage Zope start up and shutdown 
[instance] 
recipe = plone.recipe.zope2instance 
user = admin:admin 
http-address = 16080 
debug-mode = off 
verbose-security = on 
blob-storage = var/blobstorage 
zope-conf-additional = %import sauna.reload 

eggs = 
    Pillow 
    Plone 
    nva.borrow 
    sauna.reload 
    plone.app.dexterity 

# Some pre-Plone 3.3 packages may need you to register the package name here in 
# order their configure.zcml to be run (http://plone.org/products/plone/roadmap/247) 
# - this is never required for packages in the Products namespace (Products.*) 
zcml = 
# nva.borrow 
    sauna.reload 


# zopepy commands allows you to execute Python scripts using a PYTHONPATH 
# including all the configured eggs 
[zopepy] 
recipe = zc.recipe.egg 
eggs = ${instance:eggs} 
interpreter = zopepy 
scripts = zopepy 

# create bin/i18ndude command 
[i18ndude] 
unzip = true 
recipe = zc.recipe.egg 
eggs = i18ndude 

# create bin/test command 
[test] 
recipe = zc.recipe.testrunner 
defaults = ['--auto-color', '--auto-progress'] 
eggs = 
    ${instance:eggs} 

# create ZopeSkel and paster commands with dexterity support 
[zopeskel] 
recipe = zc.recipe.egg 
eggs = 
    ZopeSkel<=2.99 
    PasteScript 
    zopeskel.dexterity<=2.99 
    ${instance:eggs} 

# symlinks all Python source code to parts/omelette folder when buildout is run 
# windows users will need to install additional software for this part to build 
# correctly. See http://pypi.python.org/pypi/collective.recipe.omelette for 
# relevant details. 
# [omelette] 
# recipe = collective.recipe.omelette 
# eggs = ${instance:eggs} 

# Put your mr.developer managed source code repositories here, see 
# http://pypi.python.org/pypi/mr.developer for details on the format of 
# this part 
[sources] 
nva.borrow = svn https://novareto.googlecode.com/svn/nva.borrow/trunk 

# Version pindowns for new style products go here - this section extends one 
# provided in http://dist.plone.org/release/ 
[versions] 
+1

只是好奇:您正在扩展http://dist.plone.org/release/4.2-latest/versions.cfg创建一个Plone 4.1.4网站? – Achim 2012-08-12 19:55:47

+0

这可能是由一个以前的ZopeSkel呼叫 – 2012-08-13 04:08:56

+0

我创建了一个新的virtualenv罪魁祸首,复制你的buildout.cfg,运行boostrap.py和斌/扩建。能够启动bin/instance fg(带有一些警告)。试图在我的src文件夹中运行“../bin/zopeskel plone domma.contenta”。结果在“ImportError:No module named util.template”。 – Achim 2012-08-14 13:52:03

2

从[https://github.com/collective/templer.plone/blob/master/README.txt][1]

坦普勒不能与旧的ZopeSkel共存于相同的附加件,或Python virtualenv。

否则,你将要创建的软件包::

IOError: No egg-info directory found (looked in ./mycompany.content/./mycompany.content.egg-info, .... 

邓普勒是的ZopeSkel的最新的化身(第3版)时遇到以下错误。我不确定你有什么版本的ZopeSkel,或者你是否在buildout或virtualenv中安装了混合版本。但ZopeSkel的冲突安装可能是罪魁祸首。

我会从头开始,重新创建vitualenv,并通过buildout安装最新版本的ZopeSkel 2。 ZopeSkel 3或Templer仍处于繁重的发展阶段,并非所有模板都已迁移。

相关问题