Django server not responding when opened in browser
I've been using django for quite some time now and so far I have had no problem using it.
When I start the terminal py manage.py runserver 127.0.0.1:8000
it shows
Performing System Checks ...
The system check revealed no problems (0 disabled). July 23, 2015 - 16:17:23 Django version 1.8.3 using the 'projectname.settings' setting Start development server http://127.0.0.1:8000/ Log out of the server using CTRL-BREAK. Performing System Checks ...
And then when I opened it in my browser, it doesn't show me anything. It just download and upload and download.
I tried using it on google but some suggested that I change the port so I changed it, some said to use my ipaddress with a port other than 8000 and I did, but nothing worked for me. It was loaded on page load.
I am using django 1.8.3. Running it on windows btw
source to share
Try binding to all network interfaces:
python manage.py runserver [::]:8000
You should be able to see which port it is listening on. Go to START and enter cmd
. Right click cmd
and run as administrator. Then enter:
netstat
Do you see anything on this list?
TCP 0.0.0.0:8000 YourPC-PC:0 LISTENING
This will be a list of Django servers in the list of network ports.
source to share
Try restarting your computer.
The same thing happened to me on my Windows 10 machine while debugging multiple APIs running on a local flask dev server and accessing them using my Django webapp. Closing and restarting the Django server did not help, as there were no errors in the console until the webapp page had loaded yet. Performing a restart fixes this issue, which can be caused by starting and restarting multiple servers during the debugging process.
Note. Be sure to do a reboot and not a normal shutdown, as by default the operating system boots by default with Windows 8. Otherwise, it will simply load the previous state of your system and the problem will persist.
source to share