In case you were wondering how to do this, here’s how.
To serve your Django application over the local network, run this command
python manage.py runserver 0.0.0.0:8000
Alternatively, you can use the IP address of the host machine on the local network.
Your IP address on the local network
Open up a terminal on Linux and use the ifconfig command. Read the description here.
ifconfig
Then look for the inet field in the status output under the current interface. In my case the current interface is wifi0.
then do
python manage.py runserver 192.168.88.14:8000
Enjoy!
Top comments (0)