On 1/9/06, Justin Johnson <[EMAIL PROTECTED]> wrote:
>
>
> Found it.  Turbogears has a nice way of handling this using
> 'turbogears.view.render'.
>
> For example:
>
> return turbogears.view.render(info=dict(xpos=x, ypos=y),
> template='webapp.templates.window')
>
> Will return the string with variables from info inserted into template.
> Default encoding is html but that can be changed.

This is what gets called when you return a dictionary and have a
template listed in the turbogears.expose call. IIRC, there is now a
"fragment' option that you can use to specify that you're returning a
fragment of a page and don't want all of the document declarations,
etc. included (if you need to do that).

Kevin

Reply via email to