2011/2/4 Antônio Ribeiro <[email protected]>:
> Well, I've never seen this method before "request.is_ajax()", so i went to
> documentation.
> And here what i've found:
> "Returns True if the request was made via an XMLHttpRequest, by checking
> the HTTP_X_REQUESTED_WITH header for the string 'XMLHttpRequest'."
> So I though the jQuery already sends this header automatically, but
> examining the code, I've only found that it sends the 'x-requested-with'
> maybe that's confusing Django.
> So just set this header manually and try again
>

The header jquery sets is 'X-Requested-With'. When django parses this
header, it adds it to request.META with the key
'HTTP_X_REQUESTED_WITH' (in common with all other HTTP headers).

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en.

Reply via email to