views中加入:
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
再写下面的函数
这是暂时关闭了CSRF, 使之不会报错,生产环境中不建议这样使用。可参考csrf 攻击
http://www.cnblogs.com/hyddd/archive/2009/04/09/1432744.html
views中加入:
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
再写下面的函数
这是暂时关闭了CSRF, 使之不会报错,生产环境中不建议这样使用。可参考csrf 攻击
http://www.cnblogs.com/hyddd/archive/2009/04/09/1432744.html