Пример #1
0
 class Doc(BaseDocument):
     num = fields.IntField()
     string = fields.StringField()
     lst = fields.ListField(fields.IntField())
     map1 = fields.MapField(fields.IntField())
     map2 = fields.MapField(fields.StringField())
Пример #2
0
 class EmbedDoc(BaseDocument):
     ref = fields.ListField(fields.MapField(fields.DocumentField(Outer)))
Пример #3
0
 class Inner(BaseDocument):
     m = fields.MapField(fields.IntField())
Пример #4
0
 class EmbedDoc(BaseDocument):
     ref_map = fields.MapField(fields.DocumentField(IntDoc))
Пример #5
0
 class MapDoc(BaseDocument):
     mapping = fields.MapField(fields.IntField())
Пример #6
0
 class MapDoc(BaseDocument):
     mapping = fields.MapField(fields.IntField(required=True),
                               default={'x': 5})