Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to disable csrf token in class base view django

from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt

@method_decorator(csrf_exempt, name='dispatch') 
class TestView(View):
    def post(self, request:
        return HttpResponse('Hello world')
#mefiz.com
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #csrf #token #class #base #view #django
ADD COMMENT
Topic
Name
9+8 =