Django错误: ConnectionResetError: [Errno 54] Connection reset by peer

原因:
html里面的form和ajax各自提交了一遍POST请求,导致上面错误;

或者html里面的a和ajax各自提交了一遍POST请求,导致上面错误;

解决:

一.

//谷歌及IE8以上 e.preventDefault();

//IE8及以下 window.event.returnValue = false;

二.

a标签的取消默认行为可以在href=‘javascript:void(0);’ 

原文地址:https://www.cnblogs.com/shenZS/p/13474653.html