Default renderer

26 views
Skip to first unread message

León Domingo

unread,
May 6, 2012, 9:11:16 AM5/6/12
to pylons-...@googlegroups.com
Hi guys,

Is there a way to define a "default renderer" so every template will be rendered using that particular language? I work with Jinja (the problem would be the same with another language) and the thing is that I use it to render to HTML (most of the time) but to JS too and even to XML sometimes. I don't want to have files whose extension is .jinja2 Which one is HTML and which one is JS?

Thanks in advance

Eric Lemoine

unread,
May 6, 2012, 10:57:42 AM5/6/12
to pylons-...@googlegroups.com


On Sunday, May 6, 2012, León Domingo wrote:
Hi guys,

Is there a way to define a "default renderer" so every template will be rendered using that particular language? I work with Jinja (the problem would be the same with another language) and the thing is that I use it to render to HTML (most of the time) but to JS too and even to XML sometimes. I don't want to have files whose extension is .jinja2 Which one is HTML and which one is JS?


Won't

config.add_renderer('.hml', ...)
config.add_renderer('.js', ...)
config.add_renderer('.xml', ...)
 
work for you?


--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.l...@camptocamp.com
http://www.camptocamp.com

León Domingo

unread,
May 6, 2012, 11:21:22 AM5/6/12
to pylons-...@googlegroups.com

Of course ;-)

Thanks, Eric

León Domingo

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-...@googlegroups.com.
To unsubscribe from this group, send email to pylons-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Reply all
Reply to author
Forward
0 new messages