Skip to main content

Grok-like layer for Zope 2

Project description


.. contents::


`five.grok` is a development layer for Zope 2, based on Grok framework

The development techniques are similar to the ones used with Grok

It is based on `grokcore` namespace packages that were factored out of Grok

Implemented features

Coming from Grok, the following components are available to Zope 2

- Zope 3 Component (Adapter, Global utilities, Subscribers),

- Permissions,

- Views and Viewlets,

- Skins and resources directories,

- Page Templates (using the Zope 2 Page Templates),

- Formlib forms,

- Local sites and local utilities,

- Annotations.

All those components are available with exactly the same syntax than
in grok. You just have to do::

from five import grok

Instead of::

import grok


After adding the dependency to ``five.grok`` in your project, you have
to load the following ZCML::

<include package="five.grok" />


``five.grok`` have some dependencies on Zope 3 eggs. With Zope 2, you
can fake those dependencies in buildout with the help of

The minium required configuration to install Zope would be::

recipe = plone.recipe.zope2install
url =
skip-fake-eggs =

And for this release we recommend to pin down the following version in
your buildout::

grokcore.annotation = 1.0.1
grokcore.component = 1.7
grokcore.formlib = 1.1 = 1.1 = 1.0.1
grokcore.view = 1.7
grokcore.viewlet = 1.0
five.localsitemanager = 1.1
# You should remove five.localsitemanager from this list if you use Plone >= 3.3
martian = 0.11 = 3.5.1 = 3.4.3
zope.component = 3.4.0
zope.i18n = 3.6.0
zope.securitypolicy = 3.4.1

Zope 2.10 is required as bare minimum.

More information

You can refer to the Grok website:, and the Grok

You can check the doctest included in sources as well.

Changelog for five.grok

five.grok - 1.0b2 (2009-07-21)

* Added dependency on grokcore.view 1.9, grokcore.viewlet 1.1 and
grokcore.formlib 1.2, and support for the new CodeView from grokcore.View.

five.grok - 1.0b1 (2009-06-30)

* Added support for annotations with `grokcore.annotation`_.

* Added support for local site and utilities with ``_.

* Fix grok.EditForm when used with grokcore.formlib 1.1. The Apply
action was gone. [thefunny42]

* Let static resource directories allow access to unprotected subattributes
to avoid authorisation problems when accessing them from protected code.

* Do not create static resource directories if the 'static' directory does
not actually exist.

five.grok - 1.0a2 (2008-11-23)

* Added support for viewlets with `grokcore.viewlet`_.

* Added support for the DirectoryResource component (new in
`grokcore.view`_ 1.2).

* Added support for using Zope 2 templates by default when doing ``from
five import grok`` and using grok.PageTemplateFile (being consistent
with grok.PageTemplate).

* Added a convenient grok.Container.

* Fix AutoFields (and form grokker) not to include OFS Zope 2 defined
fields by default. This use to add a lot of buggy and wanted

five.grok - 1.0a1 (2008-10-22)

* Added support for formlib forms with `grokcore.formlib`_.

* Added support for static resource directory.

* Added support for inline templates and made Zope 2 template semantics
the default when doing ``from five import grok`` and using

* Added override to make templates use Five's ViewPageTemplateFile instead
of the one from

* Added `grokcore.view`_ support with tests.
[regebro, jfroche, gotcha et al.]

* Added tests for grok.subscriber directive.

* Initial release (tests for adapters and utilities, initial support for
[regebro, gotcha]

.. _grokcore.annotation:
.. _grokcore.view:
.. _grokcore.viewlet:
.. _grokcore.formlib:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for five.grok, version 1.0b2
Filename, size File type Python version Upload date Hashes
Filename, size five.grok-1.0b2.tar.gz (27.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page