Beispiel #1
0
 class Person(models.Base):
     name = NameField()
     surnames = fields.DerivedListField(NameField())
Beispiel #2
0
 class Car(models.Base):
     wheels = fields.DerivedListField(fields.StringField(), omit_empty=True)
     doors = fields.DerivedListField(fields.StringField(), omit_empty=False)
Beispiel #3
0
 class Car(models.Base):
     models = fields.DerivedListField(fields.StringField(),
                                      omit_empty=False,
                                      default=["default"])
Beispiel #4
0
class LazyDerivedList(models.Base):

    name = fields.StringField()
    secondaries = fields.DerivedListField(fields.EmbeddedField('Secondary'))