4
Vote

enable port specification: django

description

user crazydude says:

Hey guys! I'm really like your Python port to the Visual Studio, thanks!

But I've got one question about it. When I launch my django project in Visual Studio, it's launches the webserver with a random port, can I configure the webserver somewhere, so it will start with the port I have specified?

Thanks.

comments

eino wrote Feb 7 at 9:51 AM

Yes indeed. It would be nice to have possibility in Django Launch settings of project to set port or ipaddress port. My typical case when using WingIDE is to use python manage.py runserver 0.0.0.0:8000 and my colleagues working on another machine can visit my development server to see where it's going.

Summa summarum: also ip address setting would be nice. It's now hard coded ...manage.py runserver ...

Zooba wrote Feb 7 at 3:24 PM

This may be a suitable workaround until we implement this: you can change the launch mode to the normal Python debugger and set any parameters you like. If manage.py is you startup file then pressing F5 will be just like running it from the command line.

It looks like you get no debugging if you go this route, so it isn't a long term fix. What we'll probably do is detect when the Script Arguments property starts with "runserver" and then not add our own command and port. (At the moment we add the custom arguments after the ones we generate, so there's no way to override them.)