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

     第三章:3.3 post 请求

 

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

    第三章:3.3 post 请求

3. 以上出现的错误。

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

   第三章:3.3 post 请求

 

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

        

 第三章:3.3 post 请求

相关文章:

  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
猜你喜欢
  • 2021-10-04
  • 2022-02-07
  • 2021-10-24
  • 2022-12-23
  • 2021-03-26
  • 2022-01-04
相关资源
相似解决方案