我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用marshmallow.fields.Date()。
def _deserialize(self, value, attr, data): if isinstance(value, datetime): return value return super()._deserialize(value, attr, data) # class TimeField(BaseField, ma_fields.Time): # pass # class DateField(BaseField, ma_fields.Date): # pass # class TimeDeltaField(BaseField, ma_fields.TimeDelta): # pass