第三章:3.3 post 请求

1. 在 from表单中将 属性 methtod="post‘ 改变成post

     

 

2. 访问主页地址:http://localhost:8000/index

    

3. 以上出现的错误。

   查资料发现:Django针对 CSRF的保护措施是在生成的每一个表单中反置一个自动生成的令牌,通过令牌查看 post请求是否来自同一个网站;

   

 

   4. 刷新页面: 访问地址:https://localhost:8000/index

        

 

 

posted @ 2017-07-10 20:23  wanghonggang  阅读(153)  评论(0编辑  收藏  举报