On Jan 11, 2007, at 5:31 AM, iain duncan wrote:

>
> Anyone tried using Mako templates with gears? I am beginning to  
> think it
> might be wise to have an XML based safe & slow and a text based fast &
> loose in the toolbox, depending on the application. I could see myself
> picking Genshi or Kid whenever complicated DOM scripting is in  
> order but
> something else when I am making simple content that may potentially be
> hit heavily. Seems to me that Pylons is a good sister project to know
> alongside gears, and I guess they are moving to Mako.
>
> Any thoughts on the above?
> Thanks for all the useful input around here, BTW. ;)

Mako provides a python.templating entry_point so all you should need  
to do is prepend "mako" to the template's path (or set it as  
tg.defaultview) and install mako (of course ;)

@expose(template="mako:myapp.templates.home")
def foo(self, bar, zoo):
     # blah, blah, blah

FYI, I've just submitted a patch to mako to make mako templates  
usable in ToscaWidgets :)

Alberto

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to