1 . py -m venv .venv create virtual environment
-
cmd => .venv\Scripts\activate.bat => activate virtual environment ARBA source .venv/Scripts/activate
-
py -m pip install Django => install django
-
if message => py -m pip install --upgrade pip => upgrade pip
4.1 py => import django => print(django.get_version()) => quit() / enter python terminal and get what django version installed
-
django-admin startproject backend => start new project
-
go to project folder where is manage.py file and type => py manage.py runserver => to run server
-
py manage.py startapp posts => creates new app in django framework
-
py manage.py migrate => migrate all models
python manage.py createsuperuser
-
py manage.py makemigrations => create migrations for new models
-
to use Postgres DB need => pip install psycopg2
-
admin panel for django to create super user => py manage.py createsuperuser add user and password