Exemplo n.º 1
0
 def handle(self):
     
     data = {g: self.request.get(g) for g in self.request.arguments()}
     logging.warn(data)
     guest_id = int(data["guest_id"])
     g = Guest.get(guest_id)
     g.update(data)
     g.put()
     return {"success": True}
Exemplo n.º 2
0
 def handle(self):
     guest_id = int(self.request.get("guest_id"))
     g = Guest.get(guest_id)
     if not g:
         return {"success": False, "reason": "Guest not found"}
     return {"success": True, "value": g.to_dict()}