【发布时间】:2011-08-04 19:10:23
【问题描述】:
我已经输入了 {% csrf_token %} 和 context_instance=RequestContext(request)),但我仍然收到错误 CSRF token missing or incorrect。提前致谢!与否。
【问题讨论】:
-
您应该仔细阅读有关how to use csrf token 的文档。如果失败,请粘贴您的代码
-
例如,您没有提到设置 CsrfViewMiddleware ...但没有更多详细信息,很难为您提供帮助。
-
当您检查表单 html 时,您还能看到
csrfmiddlewaretoken隐藏字段吗?