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.
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/eTD4Xw3RQxUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment