On 04/26/2011 12:03 PM, Alessandro Molina wrote:
> On Tue, Apr 26, 2011 at 10:41 AM, alex bodnaru
> <[email protected]> wrote:
>> hello friends,
>>
>> a question:
>>
>> i'd like to use the tg.render.render(vars, engine, template) mechanism (or
>> similar) to render by a template text stored in a string, not a file.
>>
>> any suggestions?
>>
> from genshi.template import MarkupTemplate
> MarkupTemplate("<div
> xmlns:py="http://genshi.edgewall.org/";>${content}</div>").generate(content=content).render('xhtml')
>
> This should work
>
thanks alex,

no idea to use the engine as a parameter?

alex

-- 
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