qnkojw
Last Updated: August 02, 2018
·
1.742K
· wkjagt

Django dev server in vagrant

If you want to run Django in a vm (ideally using Vagrant), you may run into a problem when you follow the getting started guide in the documentation where you can't access your Django site from your host machine's browser. The solution is pretty simple, and actually present in the documentation, but you need to dig a little deeper. From the documentation:

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).

(https://docs.djangoproject.com/en/dev/ref/django-admin/)

So instead of running:

python manage.py runserver 8080

run

python manage.py runserver [::]:8080

and you're good to go.

1 Response
Add your response

30265

Here the ways to map drives in windows 10 are available so if you are facing problems and needs help so you switch to http://mapnetworkdrive.org and can have exact solution for this. Also you know more about it.

2 months ago ·