1.读取config.json中mysql地址。
This commit is contained in:
parent
f1367fdf8a
commit
20c61e96a4
5
model.py
5
model.py
|
|
@ -1,8 +1,11 @@
|
||||||
from peewee import *
|
from peewee import *
|
||||||
import datetime
|
import datetime
|
||||||
|
import config
|
||||||
|
|
||||||
|
config.init_config()
|
||||||
|
mysql_addr = config.read_json()
|
||||||
mysql_db = MySQLDatabase(
|
mysql_db = MySQLDatabase(
|
||||||
"vps", user="dmy", password="abc123+_", host="zero.yoojoo.space", port=3306
|
"vps", user="dmy", password="abc123+_", host=mysql_addr, port=3306
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue