Hi,

You can do what you want with the response. In pylons, both request
and response are webob objects
(http://pythonpaste.org/webob/reference.html#id3)

from pylons import response

response.headers['Blah'] = 'blah'

Regards,

--
Gael

On Mon, Jan 19, 2009 at 2:12 PM, Tomasz Narloch <[email protected]> wrote:
>
> I use ajax for few pages in my app.
> Sometimes I need to redirect page from example: index to index2
> The problem is when I get index with request.is_xhr == True and have to
> redirect to index 2.
>
> In next page request.is_xhr == False.
> jQuery do not add 'X-Requested-With': XMLHttpRequest' to redirected page.
>
> Is some possibility to add headers with XMLHttpRequest to method of
> controller:
> [...]
> # add header
> return redirect_to('page/index2')
>
> and then would be works when I check request.is_xhr?
>
> Best Regards,
> Tomek
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to