Thanks Andrei ! I'm going to do this way.

On Mon, Jan 10, 2011 at 10:08 AM, andrei <[email protected]> wrote:

> I created two template renders, one with base="layout", and another
> without, lets call it render_partial.
>
> render = template.render(config.template_dir, globals=template_globals,
> base='layout')
> render_partial = template.render(config.template_dir,
> globals=template_globals)
>
> In GET method I check either request is ajax or not and decide which render
> to use
>
> if web.ctx.env.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest':
>     return render_partial(...)
> else:
>     return render(...)
>
> --
> 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] <webpy%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.
>

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

Reply via email to