def get(self, req): self.set_header("Content-Type", "text/html") req = json.loads(req) reason_own, reason_ref = ( req["reasons"] if "reasons" in req else ("%s playing" % req["user"], "Testing our implementation") ) api.storeOwnResult(req["user"], req["result"], req["solution"], reason_own) api.runReference(req["solution"], reason_ref) self.write("Thanks!")
def get(self, req): req = json.loads(req) api.storeOwnResult(req["user"], req["result"], req["solution"], "Output by %s" % req["user"]) self.write("Thanks!")