[英]connectionreseterror: (errno 104) connection reset by peer
I am working on a Django web project.我正在研究 Django web 项目。 One moment before all was good but suddenly django localhost server kept itself reloading and not stopping auto-reloading the pages.
前一刻一切都很好,但突然 django 本地主机服务器保持自身重新加载并且没有停止自动重新加载页面。 First I got the following error: connectionreseterror: (errno 104) connection reset by peer And the server just kept reloading itself over and over again.
首先,我收到以下错误: connectionreseterror: (errno 104) connection reset by peer而服务器只是一遍又一遍地重新加载自己。 What could be the cause for this?
这可能是什么原因? Any help will be appreciated.
任何帮助将不胜感激。
What is your Django package version?您的 Django package 版本是什么?
There is exception in django project like yours https://github.com/django/django/commit/934acf1126995f6e6ccba5947ec8f7561633c27f django 项目中存在异常,例如您的 https://github.com/django/django/commit/934acf1126995f6e6ccba5947ec8f7561633c27f
Try to update django to newest version尝试将 django 更新到最新版本
pip install --update django
SOlved .解决了。 I was using JQuery autocomplete to search data from backend and wanted to implement onclick functionality that redirects the user to that specific item page.
我正在使用 JQuery 自动完成从后端搜索数据,并希望实现 onclick 功能,将用户重定向到该特定项目页面。
$(document).ready(function() { $("#search").autocomplete({ source: "{% url 'ajax-search' %}", select: function (event, ui) { window.location.href = ui.item.value; } }) window.location.href = '' });
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <div class="search"> <label for="search"></label><input type="text" oninput="" style="height: 36px" class="searchTerm" placeholder="What are you looking for?" name="searchtext" id="search"><input type="hidden" id="project-id"> <button type="submit" class="searchButton"> <i class="fa fa-search"></i> </button> </div>
and Issue was in line:和问题是一致的:
window.location.href = ''
I removed that line of code and now it's all good:)我删除了那行代码,现在一切都很好:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.