A cheat sheet for Django commands.
[variable] = placeholder for a variable
https://www.python.org/downloads/
https://www.youtube.com/watch?v=i-MuSAwgwCU&t=77s
install python with apt:
sudo apt update sudo apt install python3
verify python installation:
python3 --version
create a symlink for python3:
sudo ln -s /usr/bin/python3 /usr/bin/python
install pip:
sudo apt install python3-pip
python -m venv [venv_folder_name]
https://www.youtube.com/watch?v=ohlRbcasPAc&t=7s
[venv_folder_name]\Scripts\activate
python -m pip install --upgrade pip https://pip.pypa.io/en/stable/installation/
python -m pip install Django https://docs.djangoproject.com/en/4.1/topics/install/#installing-official-release
django-admin startproject [projectname]
cd projectname python manage.py startapp [appname]
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
go to [projectname]/urls.py and add:
from django.urls import include path('', include('appname.urls')),
(create the API with Rest Framework)
https://www.digitalocean.com/community/tutorials/build-a-to-do-application-using-django-and-react