[Grok-dev] Grok and chameleon

Martin Aspeli optilude+lists at gmail.com
Fri Feb 5 22:31:42 EST 2010


Martijn Faassen wrote:
> Souheil CHELFOUH wrote:
>> Then with megrok.chameleon will provide us almost everything to get started with
>
> Cool!
>
> I guess the plan should be as follows:
>
> * we merge the template stuff we were working on and release it for Grok
> 1.2.
>
> * we then see about changing grokcore.view (or Grok? grokcore.view
>     *could* be neutral) to use chameleon out of the box.

If you are thinking about changing grokcore.* packages, please bear in 
mind that these are used in Zope 2 via five.grok as well. In fact, 
five.grok is now a very thin layer, that one day would hopefully just be 
an import shim.

Of course, Chameleon works in Zope 2 as well, but the path taken by Zope 
2 itself and Plone is that it's an optional extra that, once installed, 
makes all template use chameleon. Since there's still a chance of some 
incompatibilities, we'd need a way to toggle the standard 
zope.pagetemplate support and the Chameleon integration, possibly just 
based on whether the relevant Chameleon integration package is installed.

> * a transition strategy would be to ask people to turn all path:
>     expressions into python: expressions (if python: isn't available we
>     just add it, should be trivial). We need to provide some guidance
>     here; what if you use a macro or want to look up a view using Python?
>     I don't know off the top of my head, unless it were to use 'path()'.

 From the five.grok/Zope 2 perspective, I don't think this is desirable, 
so at least at the grokcore.view level, we'd need to retain the option 
for path expressions as default.

> * we either provide a path expression plugin for backwards
>     compatibility, or perhaps instead provide a a zope.pagetemplate
>     based plugin that people can use.

five.pt already does this for Zope 2 so I suspect it'll be easier to use 
the same pattern.

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book



More information about the Grok-dev mailing list