Version | 01 |
Release Date | 01 Jan 2021 |
Type | SAP Documents |
Status | Released |
Steps for creating new project in Visual studio code
1. Create a new folder
2. Open command prompt and navigate to folder
3. Run command : python -m venv <<virutal env name>> eg : python -m venv test
4. Add folder to VS Code
5. Select interpreter
8. Create new django project
django-admin startproject web_project
9. Create new app.
Navigate to project folder (that has manage.py file) and execute the following command
python manage.py startapp hello
Setup Debug and Run Configuration
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}\\<<project_folder>>\\manage.py",
"args": [
"runserver"
],
"django": true
}
]
}