示例#1
0
 def post(self, offer_id):
     kw = Offers.get_parm(self, type='modify')
     include_geos = kw.get('geo_targeting')
     exclude_geos = kw.get('exclude_geo_targeting')
     geos = c().countries
     if include_geos:
         for geo in include_geos:
             geos.pop(geo)
         kw['exclude_geo_targeting'] = geos.keys()
     elif not exclude_geos:
         kw['geo_targeting'] = geos.keys()
     Offers._update(offer_id, **kw)
     self.redirect("/offers/manage")
示例#2
0
 def post(self):
     offer = self.json.obj
     Offers._update(offer.get('_id'), **offer)
     pass