On Tue, Oct 30, 2012 at 4:03 PM, Chris Pagnutti <chris.pagnu...@gmail.com> wrote: > Hi. I'm trying to make some AJAX calls using django-ajax > https://github.com/joestump/django-ajax > > But when I make the call, Chrome's console gives POST > http://127.0.0.1:8000/ajax/my_app/my_ajax_view.json 403 (FORBIDDEN) > If I visit the url directly in my browser, I get {"data":{"message":"Invalid > HTTP method used.","code":400},"success":false} > > Reading the docs, it seems likely that the problem may be with related to > not explicitly passing the csrf token in my jquery .ajax() call. But the > django-ajax docs/instructions don't mention anything about this, and I kinda > figured the whole point of django-ajax is to simplify these matters. > > Anyone use django-ajax that can help? What do most django developers use for > ajax? I've checked out Dajax, but I find it a bit much, yet I'm willing to > give it, or some other package another try. >
Mostly I write views that return JSON, and then call them from javascript, usually using jQuery. That's enough automation for me. 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. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.