第三章:3.3 post 请求

时间:2023-03-09 06:21:02
第三章:3.3 post 请求

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 请求