局部禁用和局部使用
from django.views.decorators.csrf import csrf_exempt,csrf_protect
装饰器:
@csrf_exempt
@csrf_protect