f476be1f by 周伟奇

fix bug

1 parent 3a34be19
......@@ -29,6 +29,12 @@ class CustomDate(fields.Date):
return value
class CustomDecimal(fields.Decimal):
def _deserialize(self, value, attr, data, **kwargs):
return self._to_string(self._validated(value))
# restframework将request.body封装至request.data, webargs从request.data中获取参数
@parser.location_loader("data")
def load_data(request, schema):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!