intro pyyml

This commit is contained in:
耿伦伦
2021-11-30 20:33:32 +08:00
parent 909f862626
commit 93ff79125f
15 changed files with 57 additions and 10 deletions

View File

@ -1,5 +1,7 @@
from store.mongo import MongoStore
from config.helper import config
class Base:
instance = None
@ -11,6 +13,9 @@ class Base:
return self.instance.user
def persists(self):
if config()['mongo']['enabled'] != 'on':
return
try:
store = MongoStore()
store.set_collection('user')