From 00bc2bdff5bf6712d084c0977760d59852d4ae06 Mon Sep 17 00:00:00 2001 From: Franklin-F Date: Sun, 13 Apr 2025 00:02:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/__init__.py | 2 ++ core/settings.py | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/__init__.py b/core/__init__.py index e69de29..063cd2c 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -0,0 +1,2 @@ +import pymysql +pymysql.install_as_MySQLdb() diff --git a/core/settings.py b/core/settings.py index 6949006..1680bca 100644 --- a/core/settings.py +++ b/core/settings.py @@ -75,8 +75,15 @@ WSGI_APPLICATION = 'ts_reshub.wsgi.application' DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'tsreshub_db', + 'USER': 'tsreshub_prod', + 'PASSWORD': 'Tr5h$Prod!92@TsRH', + 'HOST': '39.101.135.56', + 'PORT': '3306', + 'OPTIONS': { + 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", + } } }