CSRF token missing or incorrect even though I have {% csrf_token %}

后端 未结 2 2149
不知归路
不知归路 2021-02-20 18:32

I have been getting this error referring to this method in my views.py file:

def AddNewUser(request):
    a=AMI()
    if(request.method == \"POST\"):
        pri         


        
2条回答
  •  盖世英雄少女心
    2021-02-20 18:53

    NOTE: The RequestContext has to be used in both the view that serves the form as well as the view that receives the post. If you follow directions above and still doesn't work, this might be the problem! It was for me.

提交回复
热议问题