disable csrf for one url django

Solutions on MaxInterview for disable csrf for one url django by the best coders in the world

showing results for - "disable csrf for one url django"
Rafael
25 Aug 2016
1from django.views.decorators.csrf import csrf_exempt
2
3@csrf_exempt
4def xyx(request):
5  #your code
6  
7#this makes the function accept post request without csrf token
8#use it just for quick check or for operations where csrftoken authentication
9#isn't required