from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
取消csrf检查
@csrf_exempt
开启csrf
requires_csrf_token(view)
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
取消csrf检查
@csrf_exempt
开启csrf
requires_csrf_token(view)