Honestly I don't have any experience with Django and AJAX Yet. Just in case you haven't checked it out yet -- I've read you've got to submit the CSRF with your calls though. Not sure if that helps at all. Good luck!
On Oct 11, 6:07 am, Pigletto <pigle...@gmail.com> wrote: > Simple view, shown below, sometimes fail in Chrome browser (request is shown > as Pending or doesn't return any content): > > def exposer(request): > return HttpResponse('Response from AJAX exposer') > > That is called by AJAX, eg: > $.post('{% url exposer %}', {'bb':'aa'}, callback); > > Suprisingly if I change my view to: > > def exposer(request): > request.POST # yes, just call it > return HttpResponse('Response from AJAX exposer') > > it works properly. > > Also, If I don't send any data with my POST request it works: > $.post('{% url exposer %}', {}, callback); > > Problem exists only in Chrome browser and in WSGI environment (I've checked > with uWSGI and Cherokee, Django 1.3 and trunk). > > Example application that exposes the > problem:https://bitbucket.org/pigletto/chrometest/src > > Live version of this application at:http://chrometest.natcam.pl(clicking > first button sometimes fails in > Chrome). > > Application might be installed with: > python bootstrap.py --distribute > bin/buildout > bin/django syncdb > > Above will install uwsgi at bin/uwsgi, and uWSGI can be run with: > > bin/uwsgi -b 8192 -s 127.0.0.1:1088 -p 1 -z 15 -l 128 --wsgi-file > bin/django.wsgi > > Any ideas what happens? Why does use of request.POST change behaviour? -- 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.