I followed the instructions here to run Django using the built-in webserver and was able to successfully run it using python manage.py runserver
. If I access 1
For AWS users.
I had to use the following steps to get there.
1) Ensure that pip and django are installed at the sudo level
2) Ensure that security group in-bound rules includ http on port 80 for 0.0.0.0/0
3) Add Public IP and DNS to ALLOWED_HOSTS
4) Launch development server with sudo on port 80
Site now available at either of the following (no need for :80 as that is default for http):
install ngrok in terminal
sudo apt-get install -y ngrok-client
after that run:
ngrok http 8000
or
ngrok http example.com:9000
just do this:
python manage.py runserver 0:8000
by the above command you are actually binding it to the external IP address. so now when you access your IP address with the port number, you will be able to access it in the browser without any problem.
just type in the following in the browser address bar:
<your ip address>:8000
eg:
192.168.1.130:8000
you may have to edit the settings.py add the following in the settings.py in the last line:
ALLOWED_HOSTS = ['*']
hope this will help...