grokcore.chameleon

  162 downloads
1.0.3 ZPL (Zope Public License)    
  not rated
Chameleon page template support for Grok

description

download

specifications

changelog

grokcore.chameleon is a Grok extension that makes it possible to use Chameleon page templates in Grok. For more information on Grok and Chameleon page templates see:

Installation

Note that future versions of grok will depend itself on grokcore.chameleon and configure it. In other words, chameleon-based templates will be available by default from that version on!

To use Chameleon page templates with Grok all you need is to install grokcore.chameleon as an egg and include its ZCML. The best place to do this is to make grokcore.chameleon a dependency of your application by adding it to your install_requires list in setup.cfg. If you used grokproject to create your application setup.py is located in the project root. It should look something like this:

install_requires=['setuptools',
 'grokcore.chameleon',
 # Add extra requirements here
 ],


Note that if you use the allow-picked-versions = false directive in your project's buildout.cfg, you will have to add version number specifications for several packages to your [versions] section.

Then include grokcore.chameleon in your configure.zcml. If you used grokproject to create your application it's at src//configure.zcml. Add the include line after the include line for grok, but before the grokking of the current package. It should look something like this:

< include package="grok" / >
< include package="grokcore.chameleon" / >
< grok:grok package="." / >


If you use autoInclude in your configure.zcml, you should not have to do this latter step.

Then run bin/buildout again. You should now see buildout saying something like (where version numbers can vary):

Getting distribution for 'grokcore.chameleon'.
Got grokcore.chameleon 0.5.

That's all. You can now start using Chameleon page templates in your Grok application.
READ MORE   
Last updated on May 8th, 2012

0 User reviews so far.

SUBMIT