Ross Vandegrift wrote:
> On Tue, Jun 10, 2008 at 12:08:38PM -0700, Mike Orr wrote:
>
>> On Tue, Jun 10, 2008 at 11:29 AM, Ross Vandegrift <[EMAIL PROTECTED]> wrote:
>>
>>> But I don't support I could use both templating engines at once and do
>>> something like "render_mako(sometemplate)" and "render_myghty(foo)"?
>>>
>> render_myghty does not exist, and it would take some work to write due
>> to Myghty's idiosyncracies. But you should be able to use
>> render_mako() alongside Buffet's render(). However, I'm not sure when
>> Buffet is scheduled to be deleted from Pylons; probably at 1.0 but
>> maybe earlier.
>>
>
> Wow, that's basically perfect! Pylons rocks.
>
> Of course, this doesn't seem available in 0.9.6 out of the box. I
> just downloaded the 0.9.7 dev tree and the render_mako() looks like I
> could easily implement the exact same functionality.
>
> Thanks for the tip Mike!
>
If you name your templates using *.myt and *.mak, you can also do this
in your own render function (assuming your default template engine is mako).
def custom_render(template):
if template.endswith('.myt'):
return render('pylonsmyghty', template)
else:
if not template.startswith('/'):
template = '/%s' % template
return render(template)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---