Skip to main content

Grok-like layer for Zope 2

Project description

Introduction

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

The development techniques are similar to the ones used with Grok framework.

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

Implemented features

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

  • Zope 3 Component (Adapter, Utility, Subscribers),
  • Permissions,
  • Views and Viewlets,
  • Skins and resources directories,
  • Page Templates (using the Zope 2 Page Templates),
  • Formlib forms.

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

Installation

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

<include package="five.grok" />

Note

five.grok have some dependencies on Zope 3 eggs. With Zope 2, you can fake those dependencies in buildout by using the option fake-zope-eggs = true of plone.recipe.zope2instance. However, five.grok requires zope.component 3.4 at least. You can exclude that egg by mentioning zope.component in the option skip-fake-eggs in the same buildout section.

More information

You can refer to the Grok website: http://grok.zope.org/, and the Grok documentation: http://grok.zope.org/documentation/.

You can check the doctest included in sources as well.

Changelog for five.grok

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

  • Added support for viewlets with grokcore.viewlet. [thefunny42]
  • Added support for the DirectoryResource component (new in grokcore.view 1.2). [thefunny42]
  • Added support for using Zope 2 templates by default when doing from five import grok and using grok.PageTemplateFile (being consistent with grok.PageTemplate). [thefunny42]
  • Added a convenient grok.Container. [thefunny42]
  • 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 fields. [thefunny42]

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

  • Added support for formlib forms with grokcore.formlib. [thefunny42]
  • Added support for static resource directory. [thefunny42]
  • Added support for inline templates and made Zope 2 template semantics the default when doing from five import grok and using grok.PageTemplate. [optilude]
  • Added override to make templates use Five’s ViewPageTemplateFile instead of the one from zope.app.pagetemplate. [optilude]
  • Added grokcore.view support with tests. [regebro, jfroche, gotcha et al.]
  • Added tests for grok.subscriber directive. [kamon]
  • Initial release (tests for adapters and utilities, initial support for views). [regebro, gotcha]

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.0a2
Filename, size File type Python version Upload date Hashes
Filename, size five.grok-1.0a2.tar.gz (23.2 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