[Grok-dev] Anyone using Cheetah Template Engine with Grok?

Jan-Wijbrand Kolman janwijbrand at gmail.com
Mon Jan 5 15:01:03 EST 2009


Brian Wolf wrote:
> Is anyone using Cheetah Template Engine with Grok?
> I'm having difficulty configuring it to run with Grok.  File meta.zcml 
> is not found during start-up because, well, it was not created when 
> buildout was run.  If it must be hand-created, what is the correct 
> content and format?

meta.zcml should probably only contain something like:

"""
<configure xmlns="http://namespaces.zope.org/zope"
           xmlns:grok="http://namespaces.zope.org/grok">
  <include package="grok" />
  <grok:grok package=".meta" />
</configure>
"""

What this does is "grokking" whatever is defined in meta.py before the
"normal" grokking of python modules of your project takes place (as
triggered from your project's configure.zcml).

Now, the question is... what should go into meta.py?

I'm not yet entirely sure. but after reading...

http://grok.zope.org/documentation/how-to/plugging-in-new-template-languages

...I think this meta.py could contain the actual template implementation
(like the MyPageTemplate class in the aformentioned how-to), and the
global utility implementation (like the MyPageTemplateFactory class in
the how-to) glueing the Cheetah template engine into the your project.

I didn't try it myself, so I hope this helps and doesn't take you even
further from your goal...

regards,
jw








More information about the Grok-dev mailing list