[Answer]-Accessing the Django embedded server for development inside PyCharm by other hosts inside my local network?

1👍

✅

Just run the server (which is Django’s embedded server FWIW, not PyCharm’s) under http://my_private_ip:8000:

 # ./manage.py help runserver
 Usage: manage.py runserver [options] [optional port number, or ipaddr:port]

 Starts a lightweight Web server for development.
 (...)

 # ./manage.py runserver my_private_ip:8000

0👍

Assuming a Unix environment.

You need to ensure the server is listening not on the lo interface but on all interfaces (or at least the one used to connect to the LAN).

If you can customize the way PyCharm launches the server, use 0.0.0.0 as the host, as in:

 python manage.py runserver 0.0.0.0:8000

Your coworkers can then use your LAN IP address. If you don’t know it, use $ ip a.

Leave a comment