Python Django projects with source code on enroll in telugu | python crud operations with mysql

Опубликовано: 28 Сентябрь 2024
на канале: 5 Minute Zero to Hero
493
13

Python Django projects with source code on enroll in telugu | python crud operations with MySQL

Steps to follow :
Python -Django-MySQL
CRUD - Operations end to end

Create project
$django-admin startproject crudexample
$cd crudexample
$pip install django
$python manage.py startapp employee

Database Setup

Create a database "djangodb" in mysql, and configure into the settings.py file of django project. See the example.

// settings.py

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangodb',
'USER':'root',
'PASSWORD':'xxxx',
'HOST':'localhost',
'PORT':'3306'
}
}

$pip install mysqlclient

$python manage.py makemigrations

$python manage.py migrate

$python manage.py runserver

Access the application by entering localhost:8000/show, it will show all the available employee records.

Initially, there is no record. So, it shows no record message.

#python #django #harisystems #crud #projects #freeprojects
Disclaimer:
It doesn't feel good to have a disclaimer in every video but this is how the world is right now.
All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.