From 0c5c4a6ce7213178a9bff76f80448c5a9aefd853 Mon Sep 17 00:00:00 2001 From: youngS Date: Wed, 1 Dec 2021 17:45:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/fir_ser/settings.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/fir_ser/fir_ser/settings.py b/fir_ser/fir_ser/settings.py index 802b293..83f86c9 100644 --- a/fir_ser/fir_ser/settings.py +++ b/fir_ser/fir_ser/settings.py @@ -93,12 +93,29 @@ DATABASES = { 'PASSWORD': DBCONF.password, 'HOST': DBCONF.host, 'PORT': DBCONF.port, - 'CONN_MAX_AGE': 3600, 'CONN_MAX_AGE': 600, # 设置MySQL的驱动 # 'OPTIONS': {'init_command': 'SET storage_engine=INNODB'}, 'OPTIONS': {'init_command': 'SET sql_mode="STRICT_TRANS_TABLES"', 'charset': 'utf8mb4'} } + # 'default': { + # 'ENGINE': 'django.db.backends.postgresql', + # 'NAME': DBCONF.name, + # 'USER': DBCONF.user, + # 'PASSWORD': DBCONF.password, + # 'HOST': DBCONF.host, + # 'PORT': DBCONF.port, + # 'CONN_MAX_AGE': 3600, + # 'OPTIONS': { + # 'client_encoding': 'UTF8', + # # 'default_transaction_isolation': 'read committed' + # + # }, + # } + # https://www.postgresql.org/download/linux/redhat/ + # psql -U postgres + # CREATE USER flyuser WITH PASSWORD 'KGzKjZpWBp4R4RSa'; + # create database flyapp with owner=flyuser; }