I created webpage on local server with django framework (python). I have acces to it under address http://localhost:8000/. Now I want to share it over local network. I try to do it with Windows firewall Inbound/outbound rules, but it seems either I do something wrong or it's not enough.
Asked
Active
Viewed 1,347 times
2 Answers
3
To access a Django project running on a local network, you have to runserver
with 0.0.0.0 as IP
python manage.py runserver 0.0.0.0:8000
and then set
ALLOWED_HOSTS = ["localhost", "yours_host_ip_aaddress"]
that should work if your firewall allows!

Sumithran
- 6,217
- 4
- 40
- 54
1
I am not sure how to suggest a duplicate question, but seems your question have an answer here. Basically, you need to ask the django program to accept connection from the outside world by
python manage.py runserver 0.0.0.0:8000
-
You may also need to add to allowed hosts in settings.py. – Rohit Kumar Nov 03 '22 at 09:05