Answers for "disable csrf for one url django"

3

disable csrf for one url django

from django.views.decorators.csrf import csrf_exempt

@csrf_exempt
def xyx(request):
  #your code
  
#this makes the function accept post request without csrf token
#use it just for quick check or for operations where csrftoken authentication
#isn't required
Posted by: Guest on July-18-2021

Python Answers by Framework

Browse Popular Code Answers by Language