peewee mysql 实体是none
class BackDirLog(Model):
from_path = CharField()
to_path= CharField()
time = DateField()
id = IntegerField()
class Meta:
database = database
print("创建表")
BackDirLog.create_table()
backDirLog = BackDirLog(from_path=from_path, to_path=to_path, time= datetime.datetime.now())
print("backDirLog",backDirLog)
# backDirLog None
# save
这样打印出来是None,请问要怎么办呀
代码见
https://gitee.com/starplatinum111/my_util_py_pub/blob/master/back_dir_log.py