def get_users(): id = int(request.GET.get('id')) start = int(request.GET.get('start')) limit = int(request.GET.get('limit')) workspace = repo.Workspace(db_session).read(id) users = workspace.users #paging by code (discrete values) total = len(users) limit = start + limit o = map(lambda u: vo.user(u), users[start:limit]) return vo.collection(o, total)
def read(id): u = repo.User(db_session).read(id) o = vo.user(u) if u else '' return o