Example #1
0
def create_field(name, schema, validated):
    return t.column(t.Field,
                    post=t.OneOf([x[0] for x in validated["choices"]]),
                    name=name,
                    label=validated["description"],
                    choices=validated["choices"],
                    widget=schema.__class__.__name__,
                    required=validated["required"])
Example #2
0
class PointList(t.Schema):
    points = t.column(t.Collection(Point))
Example #3
0
class Pair(t.Schema):
    l = t.column(t.Container(Point), class_="left")
    r = t.column(t.Container(Point), class_="right")
Example #4
0
class Point(t.Schema):
    x = t.column(t.IntegerField, label=u"x-coordinate", class_="hidden")
    y = t.column(t.IntegerField)
    z = t.column(t.IntegerField, required=False)
Example #5
0
class Signal(t.Schema):
    color = t.column(t.TextField, t.OneOf(["red", "blue", "yellow"]))
Example #6
0
class Point(t.Schema):
    x = t.column(t.IntegerField, label=u"цик")
    y = t.column(t.IntegerField)
    z = t.column(t.IntegerField, required=False)
Example #7
0
class FieldParams(object):
    description = t.column(t.TextField)
    choices = t.column(t.ChoicesField)  # xxx
    required = t.column(t.BooleanField, default=False, required=False)
Example #8
0
 class S(Schema):
     value = column(PositiveIntegerField)
Example #9
0
 class S(_getTarget()):
     x = t.column(t.IntegerField, t.positive, x="yyy")
Example #10
0
class Signal(object):
    color = t.column(t.TextField, widget="select")