filmov
tv
Django- Change Database || Change Database In Pythonanywhere

Показать описание
#changedatabaseofdjangowebsite#changedatabaseinpythonanywhere
# JUST CODE FOR LIFE
CHange DATABASE Sqlite3 To MySql
Step 1- Go to Database section
Note - If you go first time it will ask you create database password
Step 2- # In web section
GO To Bash Console-
step 3-
Install sqlcilent-
pip install mysqlclient
Step 4- #In file sections go to project settings
change database-
DATABASES = {
'default': {
'NAME': 'databasename', # find in database section
'USER': 'username',
'PASSWORD': 'password of database',
'HOST': 'host of the database',
'OPTIONS': {
"init_command": "SET sql_mode='STRICT_TRANS_TABLES'",
}
}
}
Step 5-
Do migration and migrate-
Go to dabase sections-
open yourdatabase console
Show Tables;
Track: CHENDA & Shiah Maisel - Ten More Minutes [NCS Release]
Music provided by NoCopyrightSounds.
# JUST CODE FOR LIFE
CHange DATABASE Sqlite3 To MySql
Step 1- Go to Database section
Note - If you go first time it will ask you create database password
Step 2- # In web section
GO To Bash Console-
step 3-
Install sqlcilent-
pip install mysqlclient
Step 4- #In file sections go to project settings
change database-
DATABASES = {
'default': {
'NAME': 'databasename', # find in database section
'USER': 'username',
'PASSWORD': 'password of database',
'HOST': 'host of the database',
'OPTIONS': {
"init_command": "SET sql_mode='STRICT_TRANS_TABLES'",
}
}
}
Step 5-
Do migration and migrate-
Go to dabase sections-
open yourdatabase console
Show Tables;
Track: CHENDA & Shiah Maisel - Ten More Minutes [NCS Release]
Music provided by NoCopyrightSounds.