예제 #1
0
파일: user.py 프로젝트: yimiqisan/huwai2
 def __init__(self):
     DB_CON.register([UserDoc])
     datastore = DB_CON[DB_NAME]
     col_name = UserDoc.__collection__
     collection = datastore[col_name]
     doc = collection.UserDoc()
     API.__init__(self, col_name=col_name, collection=collection, doc=doc)
예제 #2
0
파일: event.py 프로젝트: yimiqisan/huwai2
 def __init__(self, db_name=DB_NAME):
     DB_CON.register([EventDoc])
     datastore = DB_CON[db_name]
     col_name = EventDoc.__collection__
     collection = datastore[col_name]
     doc = collection.EventDoc()
     API.__init__(self, db_name=db_name, col_name=col_name, collection=collection, doc=doc)
예제 #3
0
파일: api.py 프로젝트: yimiqisan/huwai2
 def __init__(self, idx):
     self.idx = idx
     DB_CON.register([IdDoc])
     self.datastore = DB_CON[DB_NAME]
     self.collection = self.datastore[IdDoc.__collection__]