You're right! Sorry, my mistake.
On 4 February 2011 11:06, Tom Evans <tevans...@googlemail.com> wrote: > 2011/2/4 Antônio Ribeiro <tonhog...@gmail.com>: > > 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 django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Antonio Ribeiro -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.