Django Commands: ================= 1) cd ==> navigating your project folder $ cd your_project_folder_path 2) creation of project $ django-admin startproject project-name 3) Start VS Code and open your project in VS Code 4) Running or loading of the project on the server $ python manage.py runserver 5) created app $ python manage.py startapp application-name ================================================= Database & Models: =================== database ==> store the data in table format. Model: ====== ==> Models allow us to create database tables. ==> Models are blueprint/template which can be used to create database tables. ==> to define model, we can use "class" ==> we can add models in "models.py" file. Ex: Student ==> database id name marks ============================================== Commands: ========= 1) To check all migrations of project: (table entries) $ python manage.py migrate 2) to create a table for our app: we need to create a model. Syntax: open "models.py" class ClassName(models.Model): col1 = models.CharField(max_length = 200) 3) go to "apps.py" file copy the class name (default generated class by Django) 4) go to "settings.py" INSTALLED-APPS = [ 'app_name.apps.className', ] 5) make migrations on the server: $ python manage.py makemigrations appName 6) need to create table from the model which have created. $ python manage.py sqlmigrate appName AppID 7) run the migrations: $ python manage.py migrate