Exemple #1
0
 def post(self):
     class_name = self.get_body_argument('class_name')
     img_ID = self.get_body_argument('img_id')
     l = LeanCloudApi(class_name)
     try:
         # l.del_by_ID(int(img_ID))
         l.set_by_ID(int(img_ID))  # set img ID to 0
         d = {'msg': 'success', 'img_id': img_ID}
         self.write(d)
     except:
         import traceback
         traceback.print_exc()
         d = {'msg': 'success', 'img_id': img_ID}
         self.write(d)
Exemple #2
0
    def post(self):
        class_name = self.get_body_argument("class_name")
        img_ID = self.get_body_argument("img_id")
        l = LeanCloudApi(class_name)
        try:
            # l.del_by_ID(int(img_ID))
            l.set_by_ID(int(img_ID))  # set img ID to 0
            d = {"msg": "success", "img_id": img_ID}
            self.write(d)
        except:
            import traceback

            traceback.print_exc()
            d = {"msg": "success", "img_id": img_ID}
            self.write(d)