标签:csr 请求 col missing 解决 enc div pre 解决办法
解决办法:引入csrf_exempt包:
from django.views.decorators.csrf import csrf_exempt
然后增加装饰器:
@csrf_exempt def register(request): request.encoding=‘utf-8‘ if request.GET: return render(request,‘register.html‘) elif request.POST: dictData = request.POST context = {} print(dictData)
djangopost请求报错:Forbidden (CSRF token missing or incorrect.)
标签:csr 请求 col missing 解决 enc div pre 解决办法
原文地址:https://www.cnblogs.com/daicw/p/12053706.html