示例#1
0
文件: database.py 项目: dodo/blain
 def addMessage(self, blob):
     blob = pythonize_post(blob)
     Post = self.db.Post
     if Post.find().filter_by(pid = blob['pid']).count() == 0:
         Post(**blob).add()
示例#2
0
文件: database.py 项目: koeart/blain
 def addMessage(self, service, blob):
     blob = pythonize_post(blob)
     #if not blob['by_conversation'] or blob['reply'] is not None:
     #    self.build_conversation(service, blob)
     self.db.Post(**blob).add()