Python Hosting Used In This Video
https://techieblogging.com/chemicloud
Install Django on Cpanel Shared Hosting: • How To Create Django Website In CPane...
In this video, we will see how to connect the MySQL database to the Django website in CPanel shared hosting.
Replace settings.py Database to below
===============================
DATABASES = {
'default': {
'ENGINE': 'mysql.connector.django',
'NAME': '',
'USER': '',
'PASSWORD': '',
'HOST': 'localhost',
'Port': '3306'
}
}
models.py table used in this video
===========================
class demotable(models.Model):
content1=models.CharField(blank=True,max_length=100)
content2=models.CharField(blank=True,max_length=100)
def __str__(self):
return "content1"
Library to use mysql connection with django web app: mysql-connector-python
Follow Us On Social Media Platform
============================================
/ techieblogging
/ techieblogging
/ techieblogging