"csrf_tokan",预期的"结束块"。您是否忘记注册或加载此标签?


{%extends 'base.html'%}
{% block content%}
<h1>hellow {{name}}</h1>
<form action="add" method='post'>
{% csrf_tokan %}

Enter 1st number : <input type="text" name="num1"><br>
Enter 2nd number : <input type="text" name="num2"><br>
<input type="submit">
</form>
{% endblock%}

csrf_token而不是csrf_tokan。所以用{% csrf_token %}代替{% csrf_tokan %}

相关内容

最新更新