diff --git a/FloriCore/settings.py b/FloriCore/settings.py index 524d29f..91b741a 100644 --- a/FloriCore/settings.py +++ b/FloriCore/settings.py @@ -9,8 +9,10 @@ https://docs.djangoproject.com/en/5.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/5.2/ref/settings/ """ - +import pymysql +pymysql.install_as_MySQLdb() from pathlib import Path +from decouple import config # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -74,8 +76,12 @@ WSGI_APPLICATION = 'FloriCore.wsgi.application' DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', + 'ENGINE': 'django.db.backends.mysql', + 'NAME': config('DB_NAME'), + 'USER': config('DB_USER'), + 'PASSWORD': config('DB_PASSWORD'), + 'HOST': config('DB_HOST', default='localhost'), + 'PORT': config('DB_PORT', default='3306'), } }