コード例 #1
0
 class MySchema(Schema):
     string = fields.StringField()
     uuid = fields.UUIDField()
     number = fields.NumberField()
     integer = fields.IntegerField()
     decimal = fields.DecimalField()
     boolean = fields.BooleanField()
     float = fields.FloatField()
     url = fields.UrlField()
     email = fields.EmailField()
     constant = fields.ConstantField("const")
コード例 #2
0
ファイル: test_fields.py プロジェクト: niavlys/umongo
 class MySchema(EmbeddedSchema):
     string = fields.StringField()
     uuid = fields.UUIDField()
     number = fields.NumberField()
     integer = fields.IntegerField()
     decimal = fields.DecimalField()
     boolean = fields.BooleanField()
     formattedstring = fields.FormattedStringField('Hello {to_format}')
     float = fields.FloatField()
     # localdatetime = fields.LocalDateTimeField()
     url = fields.UrlField()
     email = fields.EmailField()
     constant = fields.ConstantField("const")