[Python] how to set default ip as 0.0.0.0 for a django project to debug in visual studio 2015?

Discussão em 'Python' iniciado por Stack, Julho 16, 2025.

  1. Stack

    Stack Membro Participativo

    I am developing a django rest framework application using visual studio 2015, python 2.7, django 1.9. I have enabled CORS. I can access it from other origin when I run it through command prompt as python manage.py runserver 0.0.0.0:8086. But, in visual studio auto debug, it runs on 127.0.0.0. I want to configure visual studio to run the server on specified ip (ie. 0.0.0.0). So, that debugging will be easy.
    I have tried with setting default port and address from site-packages\django\core\management\commands\runserver.py.
    and also able to set default port in visual studio property of the project. But, unable to set the default ip.

    Can any one help me to configure the ip 0.0.0.0 as default not the default one (127.0.0.1) in visual studio.

    Thanks in advance.

    Continue reading...

Compartilhe esta Página