Update .gitignore and add files.

This commit is contained in:
2024-10-05 16:38:23 +08:00
parent a48dd47ebe
commit 50bbcd7ca5
21 changed files with 9531 additions and 7 deletions

17
stockapp/config.py Normal file
View File

@ -0,0 +1,17 @@
import logging
# MySQL 配置
db_config = {
'host': '172.18.0.2',
'user': 'root',
'password': 'mysqlpw',
'database': 'stockdb'
}
# 设置日志配置
def setup_logging(log_filename):
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s [%(filename)s:%(lineno)d] - %(message)s',
handlers=[
logging.FileHandler(log_filename),
logging.StreamHandler()
])