Access Django devserver from another machine same network

Paulo picture Paulo · May 12, 2013 · Viewed 17.6k times · Source

I'm using django's builtin server to develop a site and I want other computers in the same network I'm on to be able to access the server using the local IP address. I have seen many posts about this and after trying all suggestions it's still not allowing other computers in my network to access the site.

I run the server using

python manage.py runserver 0.0.0.0:8000

and have already opened port 8000 as you can see in the following image.

enter image description here

I'm running Django 1.4.2, Python 2.7.3, Fedora 18 on kernel 3.8.11-200

Any help is highly appreciated. Thanks.

Answer

rjv picture rjv · May 12, 2013

Use python manage.py runserver <ip>:<port>

For example,my IP is 192.168.0.100 and I want to run django app on port 80,I have to do

[sudo] python manage.py runserver 192.168.0.100:80

My port 80 needed root permissions,maybe because I have other applications accessing it.

By doing this all clients in the 192.168.0 network will be able to access the site at 192.168.0.100