예제 #1
0
 def render(self, post_id, reply_uid):
     try:
         rec = MPost.get_by_uid(post_id)
         return rec.title
     except:
         # todo:进入评论列表页面后显示None,再刷新才会删除不存在post的评论
         MReply2User.delete(reply_uid)
예제 #2
0
 def delete(self, del_id):
     '''
     Delete the id
     '''
     if MReply2User.delete(del_id):
         output = {'del_zan': 1}
     else:
         output = {'del_zan': 0}
     return json.dump(output, self)
예제 #3
0
 def tearDown(self):
     print("function teardown")
     MUser.delete_by_user_name(self.username)
     MPost.delete(self.post_id)
     MReply2User.delete(self.reply_uid)
     MReply.delete_by_uid(self.reply_uid)
예제 #4
0
    def tearDown(self):
        print("function teardown")

        MReply2User.delete(self.reply_id)