Ejemplo n.º 1
0
    def get(self, name):
        session_id = get_session_id(session, request)
        ordered = request.args.get('ordered', '1')

        dao = RequirementDAO(session_id)
        reqs = dao.get_requirements(constraint_id=name, is_asset=False, ordered=(ordered=='1'))
        dao.close()

        resp = make_response(json_serialize(reqs, session_id=session_id), httplib.OK)
        resp.headers['Content-type'] = 'application/json'
        return resp
Ejemplo n.º 2
0
  def get(self, name):
    session_id = get_session_id(session, request)
    ordered = request.args.get('ordered', '1')

    dao = RequirementDAO(session_id)
    reqs = dao.get_requirements(constraint_id=name, is_asset=False, ordered=(ordered=='1'))
    dao.close()

    resp = make_response(json_serialize(reqs, session_id=session_id), httplib.OK)
    resp.headers['Content-type'] = 'application/json'
    return resp
Ejemplo n.º 3
0
    def get(self):
        session_id = get_session_id(session, request)
        ordered = request.args.get('ordered', 0)
        constraint_id = request.args.get('constraint_id', '')

        dao = RequirementDAO(session_id)
        reqs = dao.get_requirements(constraint_id=constraint_id, ordered=(ordered=='1'))
        dao.close()

        resp = make_response(json_serialize(reqs, session_id=session_id), httplib.OK)
        resp.headers['Content-type'] = 'application/json'
        resp.headers['Access-Control-Allow-Origin'] = "*"
        return resp
Ejemplo n.º 4
0
  def get(self):
    session_id = get_session_id(session, request)
    ordered = request.args.get('ordered', 0)
    constraint_id = request.args.get('constraint_id', '')

    dao = RequirementDAO(session_id)
    reqs = dao.get_requirements(constraint_id=constraint_id, ordered=(ordered=='1'))
    dao.close()

    resp = make_response(json_serialize(reqs, session_id=session_id), httplib.OK)
    resp.headers['Content-type'] = 'application/json'
    resp.headers['Access-Control-Allow-Origin'] = "*"
    return resp