How to set the server and port in the Visual Studio Django Web Project template


I created a Django web project in Visual Studio 2017. In the context menu of the project icon in the Solution Explorer view, in the “Python” entry, I can select, among other actions, “Start server” and “Start debug server”. A cmd window opens and shows that it is sourcing the correct config settings and then attempts to start the server at localhost, port 8000. Here is where it fails on my machine since that port is taken. How do change that port (and server address) for using the context menu? (I do know how to change it for starting runserver on the command line or via the Debug configuration.)


At Visual Studio check for Solution Properties then Debug Tab

In the Run Section you can change Launch URL with the IP value and port

e.g: http//localhost:8001

Answered By – Onk_r

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published