Re: [API] Send csrf token and retrieve with javascript?

2020-10-11 Thread Dvs Khamele
Hi do you hire contract based python/django freelancer? We can help you in this and related techincal tasks at fair prices. Reply or send email to divy...@pythonmate.com Best Regards, Divyesh Khamele, Pythonmate On Thu, 1 Oct 2020, 5:10 am Alexandro Gonçalves Dos Santos, < alexandrogon...@gmail.

[API] Send csrf token and retrieve with javascript?

2020-09-30 Thread Alexandro Gonçalves Dos Santos
I am building a django api to be used in a front end of another server, how do I send the csrf token and how do I retrieve it in the front end with javascript? Currently my posts.py file looks like this: ```python from django.http import HttpResponse from django.views.decorators.csrf import ensu