Python marshmallow 模块,SchemaOpts() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用marshmallow.SchemaOpts()

项目:marshmallow-peewee    作者:klen    | 项目源码 | 文件源码
def __init__(self, meta):
        super(SchemaOpts, self).__init__(meta)
        self.model = getattr(meta, 'model', None)
        self.dump_only_pk = getattr(meta, 'dump_only_pk', True)
        if self.model and not issubclass(self.model, pw.Model):
            raise ValueError("`model` must be a subclass of peewee.Model")
        self.model_converter = getattr(meta, 'model_converter', ModelConverter)