예제 #1
0
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)
예제 #2
0
class Foo(model.Entity):
    name = Text(required=True)
    bar = Link('Bar')
    bazes = ListOf(Link('Baz'))
예제 #3
0
class NullMultiReferrer(model.Entity):
    targets = ListOf(Link(NullMultiTarget))
예제 #4
0
class NullSingleReferrer(model.Entity):
    target = Link(NullSingleTarget)
예제 #5
0
class LittorinaLittorea(Littorina):
    shell = Link('Shell', embeddable=True)
예제 #6
0
class Bar(model.Entity):
    foo = Link(Foo)
    embedded_foo = Link(Foo, embeddable=True)
    bazes = ListOf(Link('Baz', ondelete=Link.CASCADE))
    number = Integer()
    name = Text()
예제 #7
0
class CascadeReferrer(model.Entity):
    target = Link(CascadeTarget, ondelete=Link.CASCADE)
예제 #8
0
class Foo(model.Entity):
    bar = Link('Bar')
    baz = Text()