I don't use the web.py integration with mako, but I use mako
templates. I have vim configured to give me mako syntax highlighting
for .mako files.
On Oct 17, 8:43 am, "Pradeep Kishore Gowda" <[EMAIL PROTECTED]>
wrote:
> >Why not use
> > '.mako' ('.tmpl' or whatever) for Mako template engine?
>
> 1. there is no such convention in mako, as far I know and I have used
> mako since it's myghty days.
> Also, if you see the frontpage of makotemplates.org, the example
> uses ".html" . "
>
> 2. gives sensible defaults. In web.py, .html always means a template.
> This is convention over configuration.
> 3. The IF-ELSE blocks just increases the amount of code in the base library.
>
> +PG
>
>
>
> On Fri, Oct 17, 2008 at 8:57 AM, Bibby <[EMAIL PROTECTED]> wrote:
>
> > webpy use '.html' as default template file extension, hy not use
> > '.mako' ('.tmpl' or whatever) for Mako template engine? it's easy to
> > know what template engine it used.
>
> > such as (web.contrib.template):
>
> > ----<----
> > class render_mako:
> > ...skip...
> > def __getattr__(self, name):
> > # Assuming all templates are html
> > #path = name + ".html"
> > if os.path.exists(name + '.mako'):
> > path = name + ".mako"
> > elif os.path.exists(name + '.tmpl'):
> > path = name + '.tmpl'
> > else:
> > path = name + '.html'
> > t = self._lookup.get_template(path)
> > return t.render
> > ----<----
>
> --
> Home -http://pradeepgowda.com
> Heart -http://sampada.net
> Yummy! -http://konkanirecipes.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---