def on_get(self, req, resp): clubs = Queries.getClubs() collection = { 'count' : len(clubs), 'items' : clubs } req.context['result'] = collection
def on_put(self, req, resp, id): Privilege.checkClub(req.context['user'], int(id)) super(Club, self).on_put(req, resp, id, ['shortcut', 'city', 'country']) req.context['result'] = Queries.getClubs(id)[0]
def on_get(self, req, resp, id): req.context['result'] = Queries.getClubs(id)[0]
def on_get(self, req, resp): clubs = Queries.getClubs() collection = {'count': len(clubs), 'items': clubs} req.context['result'] = collection