def schema():
class BasicSchema(Schema):
class Meta:
ordered = True
foo = fields.Integer(attribute='@#')
bar = fields.String()
raz = fields.Method('raz_')
meh = fields.String(load_only=True)
blargh = fields.Boolean()
def raz_(self, obj):
return 'Hello!'
return BasicSchema()
评论列表
文章目录