修复异常问题

qrnn
youngS 3 years ago
parent b3899d4a97
commit 0c5c4a6ce7
  1. 19
      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;
}

Loading…
Cancel
Save