0

How do I access an app running on django dev server(ubuntu 15.10) from another machine on the same network(eg. a windows 7) ? I am able to ping this machine from another network computer.

"python manage.py runserver 0.0.0.0:8000" - does not allow me to access the app from another network computer.

app uses django 1.5.9

rikckie
  • 1
  • 2

2 Answers2

0

https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-runserver

Note that the default IP address, 127.0.0.1, is not accessible from other machines on your network. To make your development server viewable to other machines on the network, use its own IP address (e.g. 192.168.2.1) or 0.0.0.0 or :: (with IPv6 enabled).

runserver 0.0.0.0:8000

Make sure you open port 8000

user1797792
  • 1,169
  • 10
  • 26
0
python manage.py runserver 0.0.0.0:8000

is ok but you have to also modify settings.py of your app. You need to change ALLOWED_HOSTS. For example put * to allow access for everybody or put only certain IPs to limit access:

ALLOWED_HOSTS = ['*']

more answers here: CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False

rasto_SO
  • 1
  • 1