简体   繁体   中英

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

Running:

When I get to the second page on Testing the Type, I get an error.

I have the ZCML error below. 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:

Look for error messages on the console, and make sure you start in the foreground with ./bin/instance fg. You could have a syntax error or a ZCML error. 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.


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

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.

The arguments change in IProgram to the following below:

class IProgram(model.Schema):

NOT: class IProgram(form.Schema, IImageScaleTraversable):

You must remove only what the guide tells you to remove.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM