RODY/app/configs/default.py

30 lines
830 B
Python
Raw Permalink Normal View History

2022-11-29 16:14:09 +08:00
import os
# 根目录
ROOT_PATH = os.path.split(os.path.abspath(__name__))[0]
# 开启debug
DEBUG = True
# 密钥
SECRET_KEY = 'WugjsfiYBEVsiQfiSwEbIOEAGnOIFYqoOYHEIK'
# 数据库配置
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://deepLearner:dp2021@124.71.203.3:5432/demo'
#SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://demo:demo123@192.168.2.9:3306/flask_demo'
SQLALCHEMY_TRACK_MODIFICATIONS = False
# 查询时会显示原始SQL语句
SQLALCHEMY_ECHO = True
# SQLALCHEMY_DATABASE_URI = 'sqlite:///{}'.format(os.path.join(ROOT_PATH, 'demo.db'))
# SQLALCHEMY_TRACK_MODIFICATIONS = False
# 数据库配置
db = {
'host': '127.0.0.1',
'user': 'root',
'password': 'sdust2020',
'port': 6379,
'database': 'school',
'charset': 'utf8',
'db': 0
}