I've been using Jetbrains Pycharm for years, but lately the performance has been getting abysmal. I'd like to give Visual Studio a shot.
So I cloned my main repo, through VS, and tried to setup a "Solution". It doesn't seem to recognize my project. In Pycharm I could just clone any old repo, open the folder and then select the interpreter/env I wanted to run it in. I've kinda got it working by creating a django project in VS and then loading all my files in, but that doesn't seem right or viable.
Any tips on how to setup/create a "Solution" for a cloned django project?
In Visual Studio, select File > New > Project, search for "Django", and select the Blank Django Web Project template, then select Next.
Go to the directory where manage.py file of your Django project is present. It is normally the Base directory of your project. In that directory, Press Shift and Right Click at the same time. The from the Right Click Menu, Click on "Open PowerShell window here".
In Visual Studio create a new project and select Python
-> From Existing Python code
.
For Location
choose the folder of your existing Django project.
Clicking Ok
will open the "Create New Project from Existing Python Code Wizard" screen.
Your existing folder should already be entered, so click Next
.
On the next screen I kept the Python interpreter
settings at default
(use global default). Click Next
.
Then, be sure to check the box Customize Project Type
and select Django Web Project
.
Click Finish
.
Source
To add to VME's question, this is a screenshot from VS2017:
Make sure to select Python itself rather than any of the items below (Web etc).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With