Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Django Website from another computer on same network [duplicate]

Tags:

python

django

As the title says I want to access my django website on a different computer on the same network.

Both are running windows 10 connected to the same network. The host is connect through wifi and the other through ethernet cable.

I've changed the allowed host to my ip address.

ALLOWED_HOSTS = ['71.89.113.52', 'localhost', '127.0.0.1']

And ran the the server.

(VIRTEN) C:\Users\HP\Desktop\BBTennis\VIRTEN\src>python manage.py 0.0.0.0:8000

But I still can't access it on the other computer. When I go to 71.89.113.52:8000 or 0.0.0.0:8000, I get the message, This site can't be reached.

If possible, please present an answer with every direction I should take such as how to configure my network settings or django changes I must make.

like image 698
K2nice Avatar asked Oct 27 '25 08:10

K2nice


1 Answers

  1. check both are on same network

  2. on PC1 windows go to cmd and type ipconfig and get IP-1 address

  3. PC1 : python manage.py runserver 0.0.0.0:8000

  4. go to other PC2 on same network and type IP-1_Address:8000

like image 134
Vaibhav Avatar answered Oct 29 '25 23:10

Vaibhav



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!