示例#1
0
  def get(self):
    session_id = get_session_id(session, request)
    constraint_id = request.args.get('constraint_id', -1)

    dao = TemplateRequirementDAO(session_id)
    trs = dao.get_template_requirements(constraint_id=constraint_id)
    dao.close()

    resp = make_response(json_serialize(trs, session_id=session_id))
    resp.headers['Content-Type'] = "application/json"
    return resp
    def get(self):
        session_id = get_session_id(session, request)
        constraint_id = request.args.get('constraint_id', -1)

        dao = TemplateRequirementDAO(session_id)
        trs = dao.get_template_requirements(constraint_id=constraint_id)
        dao.close()

        resp = make_response(json_serialize(trs, session_id=session_id))
        resp.headers['Content-Type'] = "application/json"
        return resp