Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django runserver does not respond when opened in the browser

Tags:

python

django

I have been using django for quite some time now and I had no problems in using it, until now.

When I run in the terminal py manage.py runserver 127.0.0.1:8000 it shows

Performing system checks...

System check identified no issues (0 silenced). July 23, 2015 - 16:17:23 Django version 1.8.3, using settings 'projectname.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK. Performing system checks...

And then when I opened it in my browser, it does not show me anything. It just load and load and load..

I tried googling it but some suggested that I change my port, so I changed it, some said to use my ipaddress with a port other than 8000, and I did but nothing was of help to me. It's stuck on loading the page.

I am using django 1.8.3. Running it on Windows btw

like image 220
predator Avatar asked Jul 23 '15 08:07

predator


People also ask

Why Runserver is not working Django?

The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

What does Django admin Runserver do?

It puts your project's package on sys. path. It sets the DJANGO_SETTINGS_MODULE environment variable so that it points to your project's settings.py file. It calls django.

When Django developers run a Runserver command line what does it start?

The very first thing we learn while learning about Django is “How to start a server?”. For this you have to go to the project directory and the type the command “python manage.py runserver” and the server starts listening at “127.0. 0.1:8000” a.k.a “localhost:8000”, as simple as that.


1 Answers

Try restarting your computer.

Same thing happened to me on my Windows 10 machine while debugging multiple APIs running locally on flask dev server and accessing them with my Django webapp. Closing and restarting the Django server didn't help as it showed no errors on the console while the webapp page still won't load. Doing a restart eliminates this problem that may have been caused by multiple servers running and restarting while in the process of debugging.

Note: Make sure to do a restart and not a regular shutdown since fast boot is enabled by default as of Windows 8. Else, it will just load the previous state of your system and the problem will persist.

like image 153
Wargream Avatar answered Sep 22 '22 03:09

Wargream