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")
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")
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")