Search code examples
plonegrok

Plone/Grok - In a product built using "zopeskel plone", can grok conflict with plone.directives?


I am trying to build a control panel following a tutorial on the Plone Documentation site. http://docs.plone.org/develop/plone/functionality/controlpanel.html

However, I started off creating the product with (from the src folder) ../bin/zopeskel plone my.product, instead of creating with the dexterity option. I did select the easy option when it asked what mode I wanted and I did select yes when it asked if I wanted to create a GS Profile.

I made sure to include grok in configure.zcml

<include package="five.grok" />

After following the instructions, I try to run the quickinstall to install the product, but it gives me the error:

ImportError: No module named directives 

referring to the line in the settings.py file of their tutorial

from plone.directives import form 

I added plone.app.registry to the install_requires bit in the setup.py file, and I made sure to make the changes in the configure.zcml file to include Just for experimenting, I did add 'plone.app.dexterity' to the install_requires, but I still got the same error.

Is grok conflicting with plone.directives? If so, how can I fix this or do I have to use deterity instead of plone as the option for creating products? If grok is not conflicting, what could the problem be?

On a side note, the tutorial does appear to be for using dexterity to create the product, but I am not sure if that is what the problem is.


Solution

  • I created a gist with a howto that I wrote for plone.org some time ago:

    https://gist.github.com/tisto/4ef1f6c7b445faf6ad73

    This is considered best practice these days. Using grok is not recommended any longer.