11👍
You have to forward the port from Vagrant to your local machine. You can add a line like this to your Vagrantfile:
config.vm.network :forwarded_port, host: 8001, guest: 8000
And then run this in the Vagrant VM:
python manage.py runserver 0.0.0.0:8000
And on your host machine, go to http://localhost:8001 to view the webpage.
0👍
-
You have to forward the port from Vagrant to your local machine.
config.vm.network :forwarded_port, host: 8001, guest: 8000
-
Yo need to add IP to ALLOWED_HOST in your setting.py file
0.0.0.0 to the ALLOWED_HOSTS in your settings.py
-
Run Project
python manage.py runserver 0.0.0.0:8000
- [Django]-Django: Can we set permission to use an app?
- [Django]-Is it possible to include a custom 404 view for a Django app without changing anything at the project level?
- [Django]-How much dog food should one eat? – Internal and External RestAPI & Oauth2
- [Django]-Customize queryset in django-filter ModelChoiceFilter (select) and ModelMultipleChoiceFilter (multi-select) menus based on request
Source:stackexchange.com