python - how to set default ip as 0.0.0.0 for a django project to debug in visual studio 2015? -
i developing django rest framework
application using visual studio 2015, python 2.7, django 1.9. have enabled cors. can access other origin when run through command prompt python manage.py runserver 0.0.0.0:8086
. but, in visual studio auto debug, runs on 127.0.0.0. want configure visual studio run server on specified ip (ie. 0.0.0.0). so, debugging easy.
have tried setting default port , address site-packages\django\core\management\commands\runserver.py
.
, able set default port in visual studio property of project. but, unable set default ip.
can 1 me configure ip 0.0.0.0 default not default 1 (127.0.0.1) in visual studio.
thanks in advance.
first of 0.0.0.0
not ip. stands "all ipv4 addresses on local machine". when start development server as
./manage.py runserver 0.0.0.0:8086
it serve on 127.0.0.1
, whatever other ip address have configured network interface(s)
similarly cannot server on 127.0.0.0
because that's broadcast address.
if have other ip configured on computer (eg 192.168.1.1
) can type browser on computer in lan or visual studio ip address asked for.
Comments
Post a Comment