class Foo(model.Entity): stuff = Text(required=True) optional_stuff = Text() bars = InverseLink('Bar', 'foo') bazes = ListOf(Link('Baz')) embedded_bazes = ListOf(Link('Baz', embeddable=True)) embedded_foos = ListOf( Link('Foo', embeddable=True, embed_by_default=False, embedded_fields=('stuff', ))) secret = Text(hidden=True)
class Foo(model.Entity): name = Text(required=True) bar = Link('Bar') bazes = ListOf(Link('Baz'))
class NullMultiReferrer(model.Entity): targets = ListOf(Link(NullMultiTarget))
class NullSingleReferrer(model.Entity): target = Link(NullSingleTarget)
class LittorinaLittorea(Littorina): shell = Link('Shell', embeddable=True)
class Bar(model.Entity): foo = Link(Foo) embedded_foo = Link(Foo, embeddable=True) bazes = ListOf(Link('Baz', ondelete=Link.CASCADE)) number = Integer() name = Text()
class CascadeReferrer(model.Entity): target = Link(CascadeTarget, ondelete=Link.CASCADE)
class Foo(model.Entity): bar = Link('Bar') baz = Text()