Beispiel #1
0
 def post(self):
     json_board = self.request.json_body
     board_schema = BoardSchema()
     try:
         board = board_schema.deserialize(json_board)
     except colander.Invalid, e:
         errors = e.asdict()
         raise HTTPBadRequest(errors)
Beispiel #2
0
 def post(self):
     json_board = self.request.json_body
     board_schema = BoardSchema()
     try:
         board = board_schema.deserialize(json_board)
     except colander.Invalid, e:
         errors = e.asdict()
         raise HTTPBadRequest(errors)
Beispiel #3
0
    def put(self):
        board_id = self.request.matchdict.get('board_id')
        board = m.SprintBoard.query.get(board_id)
        if not board:
            raise HTTPNotFound()

        try:
            json_body = self.request.json_body
        except ValueError:
            raise HTTPBadRequest('Expect json')

        schema = BoardSchema()
        try:
            board = schema.deserialize(json_body)
        except colander.Invalid, e:
            errors = e.asdict()
            raise HTTPBadRequest(errors)
Beispiel #4
0
    def put(self):
        board_id = self.request.matchdict.get('board_id')
        board = m.SprintBoard.query.get(board_id)
        if not board:
            raise HTTPNotFound()

        try:
            json_body = self.request.json_body
        except ValueError:
            raise HTTPBadRequest('Expect json')

        schema = BoardSchema()
        try:
            board = schema.deserialize(json_body)
        except colander.Invalid, e:
            errors = e.asdict()
            raise HTTPBadRequest(errors)