By default Django development server will only be accessible through the local machine(127.0.0.1). If you want to access the server remotely then you need to run the the development server with your IP as an argument:
python manage.py runserver [your-ip-here]:8000
Change the “[your-ip-here]” to your actual IP. If you IP address is 188.8.131.52 then you will need to run the server using this:
python manage.py runserver 184.108.40.206:8000
If you have multiple network configured or you want the server to be automatically available on what your IP now currently is. Then enter 0.0.0.0 as your IP, like this:
python manage.py runserver 0.0.0.0:8000
This will bind the development server of Django on all available network/IP address. Then you will the see same message when you use just use python manage.py runserver upon successfully creating the server but instead of http://127.0.0.1:8000/ you will see a http://0.0.0.0:8000/, then you will now be able to access your server remotely.
Validating models... 0 errors found February 01, 2014 - 10:13:18 Django version 1.5.1, using settings mysite.settings Development server is running at http://0.0.0.0:8000/ Quit the server with CONTROL-C.
Warning: This server is only meant for development use so you must not use this as a production solution. This is also discouraged by Django team.
Leave a Reply