Why django page may not load? - django

Project in /root/code/mysite, i activating venv ". ./env/bin/activate", starting server "python3 manage.py runserver 0.0.0.0:8000", all ok
System check identified no issues (0 silenced). December 25, 2020 - 00:27:24 Django version 2.2.17, using settings 'main.settings' Starting development server at http://0.0.0.0:8000/ Quit the server with CONTROL-C., but on http://IP:8000 nothing. What could be the problem?

Related

Not able to connect to django rest server at http://127.0.0.1:8000/

I have used the same code as the tutorial on the
drf website
When i run
python manage.py runserver
it gives me this in the terminal
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
July 10, 2021 - 07:12:08
Django version 3.2.5, using settings 'drftut.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Firefox gives me this error:
The connection has timed out
The server at 127.0.0.1 is taking too long to respond.
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.
I'm also using wsl1 and vscode remote desktop for wsl and im running this inside a python enviroment
kill $(lsof -t -i:8000)
Use this command in terminal or cmd to kill the process which is already running on PORT 8000.
If this is also not worked for you, then try to runserver on another PORT like so python manage.py runserver 5000 or any other free port

Django runserver on Chromebook (Crostini)

I'm using a Chromebook HP 11 G5 EE and try to develop with Django.
I use Crostini (Linux terminal into Chrome OS with no developper mode).
I've created a virtualenv inside my home directory and installed with pip all my requirements.
When I try to do (with source bin/activate) :
./manage.py runserver
It returns me :
Performing system checks...
System check identified no issues (0 silenced).
May 28, 2019 - 20:02:11
Django version 2.1.5, using settings 'myproject.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
Error: You don't have permission to access that port.
I'd try to set parameters like 0.0.0.0:8000, penguin.linux.test:8000, to change ports, I've got the same error.
Is someone had the same issue and fixed it ?
Thanks !
How about this:
./manage.py runserver 0.0.0.0:8000

django app not being served on digitalocean droplet

I'm following this tutorial online https://simpleisbetterthancomplex.com/tutorial/2016/10/14/how-to-deploy-to-digital-ocean.html
I get to an intermediary step where I want to check if I can access the app on the IP address. I run python manage.py runserver 0.0.0.0:8000 which returns the following:
System check identified no issues (0 silenced).
November 22, 2018 - 17:41:08
Django version 2.1.3, using settings 'mysite.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
So no errors. Then I navigate to my_droplet_ip:8000 and I get a timeout. "took to long to respond."
I am running the runserver command from a user rather than root. Don't know if that matters...
Any idea what's going on here?
I had to expose the port 8000 by running the command sudo ufw allow 8080. Wasn't mentioned anywhere in the tutorial...

Django installation admin page not getting

I installed Django and created myproject & myapp by refer the tutorial https://www.tutorialspoint.com/django/django_creating_project.htm
I got below output while run the command $ python manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
January 05, 2018 - 06:32:21
Django version 1.11, using settings 'myproject.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
But while I run the URL in the browser http://127.0.0.1:8000/admin/, it shows "Unable to connect"

Django project 'site cant be reached'

I've created a Django project and a virtual environment where I installed python on my Ubuntu server. When I try to run the development server by typing
$ ./manage.py runserver 0.0.0.0:8000
I get the usual
Performing system checks...
System check identified no issues (0 silenced).
April 01, 2017 - 11:36:55
Django version 1.10.6, using settings 'myproject.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
However, when I go to the site [my ip address]:8000 I get a 'This site can’t be reached' message, anyone know any causes for this? thanks
It was a security group problem in the server, I didn't have custom TCP rule 8000 enabled