From 8b487c2c90e71aceea9bfadb80fdf403bf054baa Mon Sep 17 00:00:00 2001 From: xepaerz Date: Thu, 6 Apr 2023 19:24:15 +1000 Subject: [PATCH] Changing the database on MySQL --- {README_img => misc}/1_step.png | Bin {README_img => misc}/2_step.png | Bin {README_img => misc}/3_step.png | Bin {README_img => misc}/4_step.png | Bin pairent_backend/pairent_backend/settings.py | 11 +++++++++-- pairent_backend/requirments.txt | 3 ++- 6 files changed, 11 insertions(+), 3 deletions(-) rename {README_img => misc}/1_step.png (100%) rename {README_img => misc}/2_step.png (100%) rename {README_img => misc}/3_step.png (100%) rename {README_img => misc}/4_step.png (100%) diff --git a/README_img/1_step.png b/misc/1_step.png similarity index 100% rename from README_img/1_step.png rename to misc/1_step.png diff --git a/README_img/2_step.png b/misc/2_step.png similarity index 100% rename from README_img/2_step.png rename to misc/2_step.png diff --git a/README_img/3_step.png b/misc/3_step.png similarity index 100% rename from README_img/3_step.png rename to misc/3_step.png diff --git a/README_img/4_step.png b/misc/4_step.png similarity index 100% rename from README_img/4_step.png rename to misc/4_step.png diff --git a/pairent_backend/pairent_backend/settings.py b/pairent_backend/pairent_backend/settings.py index a5c04cd..4b110c9 100644 --- a/pairent_backend/pairent_backend/settings.py +++ b/pairent_backend/pairent_backend/settings.py @@ -75,8 +75,15 @@ WSGI_APPLICATION = 'pairent_backend.wsgi.application' DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'pairent_db', + 'USER': 'root', + 'PASSWORD': '', + 'HOST': '127.0.0.1', + 'PORT': '3306', + 'OPTIONS': { + 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'" + } } } diff --git a/pairent_backend/requirments.txt b/pairent_backend/requirments.txt index 68d357c..dbe7e1c 100644 --- a/pairent_backend/requirments.txt +++ b/pairent_backend/requirments.txt @@ -1 +1,2 @@ -django \ No newline at end of file +django +mysqlclient \ No newline at end of file