Beispiel #1
0
 def on_get(self, req, resp):
     clubs = Queries.getClubs()
     collection = {
         'count' : len(clubs),
         'items' : clubs
     }
     req.context['result'] = collection
Beispiel #2
0
 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]
Beispiel #3
0
 def on_get(self, req, resp, id):
     req.context['result'] = Queries.getClubs(id)[0]
Beispiel #4
0
 def on_get(self, req, resp):
     clubs = Queries.getClubs()
     collection = {'count': len(clubs), 'items': clubs}
     req.context['result'] = collection
Beispiel #5
0
 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]
Beispiel #6
0
 def on_get(self, req, resp, id):
     req.context['result'] = Queries.getClubs(id)[0]