Re: CSRF and API Calls

2017-09-25 Thread Tom Gorup
The view for csrf token is what I'm testing out now. I created a standard GET handler which should be returning the CSRF token. I was hoping to see how others have solved the problem. Possibly more elegantly that a "pre" GET to the POST just to obtain the CSRF token; however, at the same time I

RE: CSRF and API Calls

2017-09-22 Thread Matthew Pava
Do you have access to the Django backend code? You could disable CSRF validation by applying the @csrf_exempt decorator to the corresponding view functions. Maybe you could create a view that returns only the CSRF token (through AJAX?) that you can utilize as needed? From: django-users@googlegro