[英]Plone 4.3.3 - Schema-Driven types - plone.directives.form not importing
I am following the Plone guide for Schema-Driven Types: http://docs.plone.org/external/plone.app.dexterity/docs/prerequisite.html 我正在遵循模式驱动类型的Plone指南: http : //docs.plone.org/external/plone.app.dexterity/docs/prerequisite.html
Running: 运行:
When I get to the second page on Testing the Type, I get an error. 当我到达测试类型的第二页时,出现错误。
I have the ZCML error below. 我在下面有ZCML错误。 I have already made sure to do what it says.
我已经确保做到了它所说的。 I did another clean install and received the same error.
我进行了另一个全新安装,并收到了相同的错误。 Here is what it says in the guide.
这就是指南中的内容。
If Zope doesn't start up: 如果Zope无法启动:
Look for error messages on the console, and make sure you start in the foreground with ./bin/instance fg. 在控制台上查找错误消息,并确保以./bin/instance fg从前台开始。 You could have a syntax error or a ZCML error.
您可能有语法错误或ZCML错误。 If you have a failed import for plone.directives.form, make sure that you specified the [grok] extra for plone.app.dexterity in your setup.py install_requires.
如果您导入plone.directives.form失败,请确保在setup.py install_requires中为plone.app.dexterity指定了额外的[grok]。
Error Message: 错误信息:
ZopeXMLConfigurationError: File "/Users/Josh/Documents/Plone4/buildout-cache/eggs/Products.CMFPlone-4.3.3-py2.7.egg/Products/CMFPlone/configure.zcml", line 98.4-102.10
ZopeXMLConfigurationError: File "/Users/Josh/Documents/Plone4/zinstance/src/example.conference/example/conference/configure.zcml", line 18.2-18.27
NameError: name 'form' is not defined
Here is the full log of the error message http://pastie.org/9200196 这是错误消息的完整日志, http://pastie.org/9200196
I figured out what I did with the help of one of the amazing developers at where I work. 在我工作的一位出色的开发人员的帮助下,我弄清楚了自己的工作方式。
On the Setting the schema part of the guide, I did not fully change program.py & session.py. 在指南的“设置架构”部分,我没有完全更改program.py和session.py。
The arguments change in IProgram to the following below: IProgram中的参数更改为以下内容:
class IProgram(model.Schema): IProgram(model.Schema)类:
NOT: class IProgram(form.Schema, IImageScaleTraversable): NOT:类IProgram(form.Schema,IImageScaleTraversable):
You must remove only what the guide tells you to remove. 您只能删除指南中告诉您的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.