Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django: IE doesn't load localhost or loads very SLOWLY

I'm just starting to learn Django, building a project on my computer, running Windows 7 64-bit, Python 2.7, Django 1.3.

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....

like image 877
reedvoid Avatar asked May 18 '11 14:05

reedvoid


People also ask

Why is django server slow?

Django is "slow"-er because it does a lot. Compare a Django-default "hello world" with even a Flask equivalent. Django's will be slower in large part because of things like middleware. Just because the code you write looks the same, doesn't mean that your tests equate.

How do I run django on localhost?

Use the Django admin console Create a superuser. You will be prompted to enter a username, email, and password. In your browser, go to http://localhost:8000/admin. Log in to the admin site using the username and password you used when you ran createsuperuser .

What is django admin commands?

django-admin is Django's command-line utility for administrative tasks. This document outlines all it can do. In addition, manage.py is automatically created in each Django project.


1 Answers

It might be related to this issue: https://code.djangoproject.com/ticket/16099

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.

Edit:

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.

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.

like image 158
Paul McMillan Avatar answered Oct 27 '22 00:10

Paul McMillan