2013年8月1日
摘要: CSRF token missing or incorrect-- 1 在 templete 中, 为每个 POST form 增加一个 {% csrf_token %} tag. 如下: {% csrf_token %} 2 在 view 中, 使用 django.template.RequestContext 而不是 Context. render_to_response, 默认使用 Context. 需要改成 RequestContext. 导入 class: from django.template import RequestContext 给 render_to_respo... 阅读全文
posted @ 2013-08-01 17:38 一个人的天空@ 阅读(5648) 评论(0) 推荐(0) 编辑