pythondjangoptvs

How to run Django manage.py commands in Python Tools for Visual Studio?


Development using Django requires running manage.py commands once in a while. I'm using Python Tools for Visual Studio (PTVS) with VS 2015 community ed. Some manage.py commands (like syncdb) are accessible from the menu when a project is created using PTVS's Django template (but not when you use a generic python project and install django using "Install Python package..."), but for others you have to do it the usual way. It seems a waste of time opening a command prompt, changing directory, activating virtualenv and going back to the manage.py's dir - just to execute one command.

I noticed that in JetBrains PyCharm it is possible to run Django manage.py utility from within the IDE. Is there a similar feature in Python Tools? Or is it possible to create a shortcut in VS for that?

Thanks!


Solution

  • I found an answer to this question myself, turns out it was asked before. And the answer is no, there is no such feature in PTVS. Here is a disscussion of this issue in the PTVS bug tracker. As an alternative, console launching extension could be used.