2

私は Plone 開発を学び始めてとてもイライラしています。Plone 4 用の器用さベースのコンテンツ タイプを開発したいと考えています。私は経験豊富な Python 開発者で、Zope と Grok についてある程度の知識があり、buildout にはかなり慣れていません。そうは言っても、Martin Aspeli の「Professional Plone 4 Development」を読みましたが、本のかなりのバージョン情報が古くなっているようです。

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)

指定されたディレクトリ内から paster を実行しようとすると、コマンド「add」が不明であることがわかります。ZopeSkel のさまざまなバージョンを試し、生の plone テンプレートと zopeskel.dexterity も試しました。バージョンとテンプレートによって出力が若干異なりますが、結果は同じです。

明らかに、Plone の開発はバージョンの変更に非常に敏感であるように思われます。http://plone.org/products/dexterity/documentation/manual/developer-manualは、1114年前に前回更新されたことを教えてくれます。

本当に機能するPlone 4用の非常に単純な器用さのコンテンツタイプを開発するための出発点を誰か教えてくれませんか?

4

4 に答える 4

4

価値のあることとして、一部のパッケージにはいくつかの新しいバージョンがありますが、Professional Plone 4 Development は Plone 4.1 で最新です。それを使用して、サンプルコードから始めることをお勧めします。作業の開始点があり、問題がないことがわかるまで、恣意的にアップグレードしようとしないでください。

于 2012-08-12T16:04:56.153 に答える
3

http://pigeonflight.blogspot.com/2012/01/dexterity-development-quickstart-using.htmlは、優れたクイックスタートを提供します。最新の Dexterity ドキュメントはhttp://dexterity-developer-manual.readthedocs.org/en/latest/index.htmlにあります。はい、これはドキュメンテーションに関しては、少し動くターゲットです。Dexterity は安定しており、本番環境にあるためではありませんが、主に Zopeskel が現在大規模な開発/モダナイゼーションを行っているためです。申し訳ありません。

于 2012-08-12T14:34:18.037 に答える
2

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

Templer は古い ZopeSkel と同じビルドアウト、または Python virtualenv と共存できません。

そうしないと、パッケージを作成しようとしたときに次のエラーが発生します::

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

Templer は ZopeSkel(バージョン 3) の最新版です。ZopeSkel のどのバージョンを使用しているか、ビルドアウトまたは virtualenv にバージョンが混在してインストールされているかはわかりません。しかし、ZopeSkel の競合するインストールが原因である可能性があります。

私はゼロから始めて vitualenv を再作成し、ビルドアウトを介して ZopeSkel 2 の最新バージョンをインストールするだけです。ZopeSkel 3 または Templer はまだ大規模な開発中であり、すべてのテンプレートが移行されたわけではありません。

于 2012-08-13T14:16:59.457 に答える
1

このビルドアウトを使用して、新しい Dexterity コンテンツ タイプを持つ新しい 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]
于 2012-08-12T17:47:20.767 に答える