예제 #1
0
 def get(self, offer_id):
     err = JsOb()
     offer = Offers.find_one(dict(_id=int(offer_id)))
     if not offer:
         err.ad_info = "not found!"
     if err:
         self.render(err)
     else:
         offer.deleted = True
         offer._id = int(offer._id)
         offer.save()
     self.redirect("/offers/manage")
예제 #2
0
 def get(self, ad_id):
     err = JsOb()
     ad = Advertisers.find_one(dict(_id=int(ad_id)))
     if not ad:
         err.ad_info = "not found!"
     if err:
         self.render(err)
     else:
         ad.status = '0'
         ad._id = int(ad._id)
         ad.save()
     self.redirect("/advertisers/manage")
예제 #3
0
 def get(self, aff_id):
     err = JsOb()
     aff = Affiliate.find_one(dict(_id=int(aff_id)))
     if not aff:
         err.ad_info = "not found!"
     if err:
         self.render(err)
     else:
         aff.deleted = True
         aff._id = int(aff._id)
         aff.save()
     self.redirect("/affilicates/manage")