首先要确认自己在views.py中使用的是render()
之后确认自己在xx.html中的 <form> <script type="math/tex" id="MathJax-Element-226">
最后这么处理!…
添加 @csrf _ token 装饰器,作用是跳过 csrf 中间件的保护,如下:
在view.py中
这样之后就可以了!!! 不再报 403 错误了。