def get(self): matches = {} m = re.match('^/match/([0-9a-f]{32})$', self.request.uri) if m: ride_id = m.group(1) matches = RideHelper.get_matches(ride_id) matches_js = simplejson.dumps(matches) self.write(matches_js)
def get_matches(ride_to_match_id): # Get matches rides = RideHelper.get_matches(ride_to_match_id) print "rides_matched for user with id = %s" % ride_to_match_id print rides return rides