CSRF Failed: CSRF token missing or incorrect

前端 未结 12 965
臣服心动
臣服心动 2020-11-29 02:42

I\'m using Django 1.7 and django-rest-framework.

I made an API that returns me some JSON data putting this in my settings.py

REST_FRAMEW         


        
12条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 03:13

    django1.8 python2.7

    {
        "detail": "CSRF Failed: CSRF token missing or incorrect."
    }
    

    I fix it by using other httpmethod; oh, I face it again, this time is because I paste it, there are some invisible characters

提交回复
热议问题