Django:IE不加载本地主机或非常缓慢地加载 [英] Django: IE doesn't load localhost or loads very SLOWLY
问题描述
我刚刚开始学习Django,在我的电脑上建立一个项目,运行Windows 7 64位,Python 2.7,Django 1.3。
I'm just starting to learn Django, building a project on my computer, running Windows 7 64-bit, Python 2.7, Django 1.3.
写,它立即加载在Chrome和Firefox中。但对于IE(版本9),它只是停在那里,什么都不做。我可以在IE上加载http://127.0.0.1:8000,让计算机上几个小时,不加载。有时,当我刷新几次或重新启动IE它将工作。如果我在代码中更改了一些内容,Chrome和Firefox会立即反映更改,而IE不支持,如果它加载页面。
Basically whatever I write, it loads in Chrome and Firefox instantly. But for IE (version 9), it just stalls there, and does nothing. I can load up "http://127.0.0.1:8000" on IE and leave the computer on for hours and it doesn't load. Sometimes, when I refresh a couple of times or restart IE it'll work. If I change something in the code, again, Chrome and Firefox reflects changes instantly, whereas IE doesn't - if it loads the page at all.
发生了什么?我在这里失去了我的想法。
What is going on? I'm losing my mind here....
推荐答案
可能与此问题有关:
https://code.djangoproject.com/ticket/16099
本质上,dev服务器不是多线程的,如果浏览器打开一个连接,然后尝试第二个连接实际获取数据,它可以永久挂起。
Essentially, the dev server isn't multithreaded, and if the browser opens a connection and then tries a second connection to actually get the data, it can hang forever.
编辑:
另外,看到这个问题:
https://code.djangoproject.com/ticket/15178
Also, see this issue: https://code.djangoproject.com/ticket/15178
如果您可以提供一种重现问题的方法,可能会找到一个修复。
If you can provide a way to reproduce the issue, we may be able to find a fix.
另外,如果您可以尝试最新的开发版本,看看是否修复它,我们最近提交了一个新的补丁,添加多线程功能到runserver命令。
Also, if you could try the latest development version and see if that fixes it, we recently committed a new patch that adds multithreading capability to the runserver command.
这篇关于Django:IE不加载本地主机或非常缓慢地加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!