Groups
Groups
Sign in
Groups
Groups
Django REST framework
Conversations
About
Send feedback
Help
Jquery ajax
255 views
Skip to first unread message
Marko Tibold
unread,
Apr 22, 2012, 9:56:47 AM
4/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-res...@googlegroups.com
Hey all,
has any of you guys successfully implemented jquery ajax calls with the framework?
There are some challenges in regard to sending a csrf token as I know so far.
It would be great if you could share some example code.
I'm happy to extend the
http://django-rest-framework.org/howto.html
section with a Jquery chapter based on any examples.
Regards,
Marko
User Name
unread,
Apr 22, 2012, 10:06:40 AM
4/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-res...@googlegroups.com
I'm interested in this too, since till now I usually wrap my view functions with @csrf_exempt for making Ajax calls though js/jquery.
Thanks!
Marko Tibold
unread,
Apr 22, 2012, 10:29:25 AM
4/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-res...@googlegroups.com
This snippet does the trick:
http://djangosnippets.org/snippets/2656/
It adds a `X-Csrftoken` to the request header.
Reply all
Reply to author
Forward
0 new messages