From: Patrick Canterino Date: Sun, 23 Jan 2022 16:53:38 +0000 (+0100) Subject: Switched from SQLite3 to MariaDB / MySQL X-Git-Url: https://git.p6c8.net/pcdenotes.git/commitdiff_plain/6126901bf6fee42ebf28f1e054e93ffdb73f10c5?ds=inline;hp=16158647286ae7497203e084789688c613698d68 Switched from SQLite3 to MariaDB / MySQL --- diff --git a/pcdenotes/settings.py b/pcdenotes/settings.py index fdd29e4..db9476f 100644 --- a/pcdenotes/settings.py +++ b/pcdenotes/settings.py @@ -82,8 +82,12 @@ WSGI_APPLICATION = 'pcdenotes.wsgi.application' DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', + 'ENGINE': 'django.db.backends.mysql', + 'NAME': str(os.getenv('PCDENOTES_DB_NAME')), + 'HOST': str(os.getenv('PCDENOTES_DB_HOST')), + 'PORT': int(os.getenv('PCDENOTES_DB_PORT')), + 'USER': str(os.getenv('PCDENOTES_DB_USER')), + 'PASSWORD': str(os.getenv('PCDENOTES_DB_PASSWORD')) } } diff --git a/requirements.txt b/requirements.txt index ff18f3b..e7359d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ Django==3.2.11 django-markdownify==0.9.0 importlib-metadata==4.8.3 Markdown==3.3.6 +mysqlclient==2.1.0 packaging==21.3 pkg-resources==0.0.0 pyparsing==3.0.6