Untitled

mail@pastecode.io avatar
unknown
text
2 years ago
914 B
1
Indexable
Never
//see django version
python -m django --version

//install requirements
python -m pip install -r requirements.txt

//install package
python -m pip install django

//creating virtual env
python -m venv env

//activating virtual env
my_env -> Scripts -> activate.bat


//activating virtual env(from terminal, vs code terminal)
my_env\Scripts\activate

//run django server
py manage.py runserver

//problem regarding script runnning
//Run the following command with administration privilage
Set-ExecutionPolicy -ExecutionPolicy Unrestricted

//generate migration scripts containing db command
python manage.py makemigrations tutorials

//actual migration operation
python manage.py migrate tutorials

//activate debugger in visual code
- ctrl+shift+p (command paletter)
- Python:Select Interpreter
- my_env\Scripts\python.exe
- click "create launch.json", define "8000" in args