1 . py -m venv .venv create virtual environment

  1. cmd => .venv\Scripts\activate.bat => activate virtual environment ARBA source .venv/Scripts/activate

  2. py -m pip install Django => install django

  3. 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

  1. django-admin startproject backend => start new project

  2. go to project folder where is manage.py file and type => py manage.py runserver => to run server

  3. py manage.py startapp posts => creates new app in django framework

  4. py manage.py migrate => migrate all models

python manage.py createsuperuser

  1. py manage.py makemigrations => create migrations for new models

  2. to use Postgres DB need => pip install psycopg2

  3. admin panel for django to create super user => py manage.py createsuperuser add user and password