On the page of Django project, when submitting the form post request, an error will be reported: CSRF verification failed. Request aborted
You need to add: {% CSRF} to the form_ Token%} can be solved
Such as
1 <form action="" method="post" enctype="multipart/form-data">
2 {% csrf_token %}
3 <div>
4 import Exl<input type="file" name="exl_obj">
5 <input type="submit" value="upload to server">
6 </div>
7 </form>