I decided to develop a web application with Python with an acquaintance, so I made a memorandum.
There is a Mac version of the article in a similar article. (Mac version article)
Create in the following environment so that all members can use the PC owned by the member for free because there are multiple environments of Mac and Windows. For the time being, create up to Intellisense debug execution with VSCODE.
・ IDE
VSCode version 1.8.1
·language
Python3
Django 1.10.4
・ OS
Windows10
I am working with reference to this article (thanks) Introduction to Python Django (1) ・ Introduction to Python Django (2) Win
Python Path and Version pythonVSCode some virtualenv issues #148 Troubleshooting Intellisense Autocompletion
Bring the installer from the Python site and install it. Note that if you forget to check Add Python 3.6 to PATH, it will be troublesome.
C:\Users\hoge>pip install virtualenv
C:\Users\hoge>mkdir sandbox
C:\Users\hoge\sandbox>cd sandbox
C:\Users\hoge\sandbox>mkdir python
C:\Users\hoge\sandbox>cd python
C:\Users\hoge\sandbox\python>virtualenv env1
C:\Users\hoge\sandbox\python>cd env1
C:\Users\hoge\sandbox\python\env1>Scripts¥activate
(env1) C:\Users\hoge\sandbox\python\env1>
(env1) is successful
(env1) C:\Users\hoge\sandbox\python\env1>pip install django==1.10.4
(env1) C:\Users\hoge\sandbox\python\env1>pip freeze -l
Django==1.10.4
(env1) C:\Users\hoge> cd Documents\Develop\pythonSites
(env1) C:\Users\hoge\Documents\Develop\pythonSites> django-admin.py startproject myTestSite
Please choose the development folder to your liking. In the above, you will have C: \ Users \ hoge \ Documents \ Develop \ pythonSites / myTestSite.
Download and install from Visual Studio Code
Install Python by typing Python from View> Extensions (Don Jayamanne's guy)
C:\Users\hoge>cd sandbox\python\env1
C:\Users\hoge\sandbox\python\env1>Scripts¥activate
(env1) C:\Users\hoge\sandbox\python\env1> cd C:\Users\hoge\Documents\Develop\pythonSites
(env1) C:\Users\hoge\Documents\Develop\pythonSites>"C:\Program Files (x86)\Microsoft VS Code\Code.exe" .
Note that if you do not use the above login method, the default virtual environment settings and other settings will be incorrect.
setting.js
//Insert settings in this file to override the default and user settings
{
"python.pythonPath": "C:/Users/hoge/sandbox/python/env1/Scripts/python.exe",
"python.linting.pylintEnabled": false,
"python.linting.pep8Enabled": true
}
Set to enable intellisense and debugging environment. The location of the file is File> Preferences> Workspace Settings. Set only when you open this workspace.
Unlike the Mac version, the windows version is a simple specification that ends with this setting ... I envy
For the time being, in order to create a template file, click the debug icon from the menu on the left and forcibly execute debugging.
If you do so far, intellisense
Debug execution
Ready mouse. After all it is MS, I feel that the Windows version is a little better.