9 messages in com.googlegroups.pylons-discussRe: Alternate template systems, Buffe...
FromSent OnAttachments
Jamie21 Dec 2006 22:44 
Ben Bangert22 Dec 2006 00:52 
Mike Orr22 Dec 2006 10:34 
Shannon -jj Behrens27 Dec 2006 15:38 
Shannon -jj Behrens27 Dec 2006 15:42 
Cliff Wells28 Dec 2006 18:04 
Matt Good29 Dec 2006 07:57 
Cliff Wells29 Dec 2006 08:40 
Michael Bayer30 Dec 2006 15:27 
Subject:Re: Alternate template systems, Buffet, conflicts with TurboGears, and probably other stuff [was Re: The Myghty Philosophy]
From:Matt Good (matt@public.gmane.org)
Date:12/29/2006 07:57:16 AM
List:com.googlegroups.pylons-discuss

Cliff Wells wrote:

Shannon -jj Behrens wrote:

By the way, before this thread gets out of control, I strongly believe templating engines are a matter of engineering taste. Pick one you (and your team) like, and let other developers pick ones they like. Pylons doesn't tie you to any of them.

Speaking of, I'm a bit curious about the differences between Buffet and the Buffet derivative in Pylons. I've just finished a new templating system and am going to have it working with Buffet/CherryPy/TurboGears, but I'd like to have it work with Pylons too, if at all possible.

I looked over the source for Buffet in Pylons and it appears the main difference is the import of some values from the pylons module (although I was just a bit thrown by having the Myghty plugin tossed in there as well - shouldn't that be in a separate module?). One thing that concerns me is if there will be any conflict for people with both TurboGears and Pylons installed... they both use the python.templating.engines entry point. I had the following in my setup.py:

entry_points = ''' [python.templating.engines] breve = breve.plugin.buffet:BreveTemplatePlugin pylonsbreve = breve.plugin.pylons:BreveTemplatePlugin '''

and this would cause TurboGears to crash with an error appearing to relate to the Pylons version (although the Pylons version imports just fine from the interactive prompt) =(

Anyway, any advice, suggestions, pointers, rtfms, et al appreciated.

The "python.templating.engines" entry point is just a specification implemented either by your templating engine (Myghty, Kid, Genshi, ...), or by your framework (TurboGears, Buffet, Pylons, ...)

As long as both sides properly implement the spec they should all work interchangably. So, you shouldn't need to write separate plugin implementations for Buffet and Pylons. I originally tested the Genshi plugin on TurboGears, but it worked fine on Pylons without modification.

What's the error you're getting with the Pylons version?