简单的解决方法,在views.py中导入
from django.views.decorators.csrf import csrf_exempt,csrf_protect
然后在接收POST的方法前添加修饰
@csrf_exempt
如下:
@csrf_exempt
def save(request):
return HttpResponse(content)
500阅读 0评论2023-11-27 zhangjiakouzf
分类:LINUX