with use of tg.render, we can achieve this,
from tg.render import render_genshi

# tg.__version__ = 2.1b2

rendered_cnt = render_genshi('templates/pdfgen.html',{'id':
12,'name':'perumal'})

the function return the generated html content, with your template
context
On Mar 25, 3:08 pm, Christopher Arndt <[email protected]> wrote:
> Am 25.03.2010 10:04, schrieb Rotem Tamir:
>
> > can you provide more clues please, as i don't understand how this is
> > done, i am simply using the tg1.1 api which is behaving in the way
> > described above...
>
> To render a Genshi template to HTML without using TurboGears at all:
>
> http://paste.chrisarndt.de/paste/8a0c2a1ab9044027a6013dfec081a1a1
>
> > i am importing turbogears.view and then doing
> > rendered = view.render(info=info,template=template)
>
> If you want to have access to the TurboGears variables in the template,
> and render a template from your TurboGears application, see for example
> the _render_error_template method from my errorcatcher controller in my
> EggBasket application.
>
> http://trac.chrisarndt.de/eggbasket/browser/EggBasket/trunk/eggbasket...
>
> The errorcatcher controller is also explained here:
>
> http://docs.turbogears.org/1.0/ErrorReporting#method-3-application-wi...
>
> (see the example project download linked in the section).
>
> Chris

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