1👍
✅
I had to add the decorator from django.views.decorators.csrf import ensure_csrf_cookie
to my function to make it returns a CSRF token.
👤jul
0👍
Django documentation speaks on this here: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax
An alternative is to use a framework like http://www.django-rest-framework.org/api-guide/authentication
- [Answer]-Django admin delete != Model.delete()
- [Answer]-Coercing to Unicode: need string or buffer, list found
- [Answer]-Django Link not working in for loop
Source:stackexchange.com