0

im stuck in hosting my Django app. Can you guys help me to sort it out.

settings.py

DEBUG = True
ALLOWED_HOSTS = ['http://127.0.0.1:8000', 'localhost', '127.0.0.1', '192.168.1.190',]

and my ifconfig is

enter image description here

I tried this

python manage.py runserver 0:8000
python manage.py runserver 192.168.1.190:8000

I got the following result in my browser

[![enter image description here][2]][2]

Correct me if I am wrong. Thanks in advance. Have a great day.

bmons
  • 3,352
  • 2
  • 10
  • 18

1 Answers1

1

Try this.

ALLOWED_HOSTS = ['*']

python manage.py runserver 0.0.0.0:port
Eg.
python manage.py runserver 0.0.0.0:8000
and browse ip:port
Eg. 192.168.1.190:8000

If you should use same network to open in another computer.

Gorkhali Khadka
  • 823
  • 8
  • 12
  • thanks for the reply. i already try this method(192.168.1.190:8000) but still im getting the same error. i disable the firewall in my ubuntu machine but it still shows your site cant be reached. – Issac Surendar Jan 13 '20 at 03:08