Exemplo n.º 1
0
class Demo1Field(choices.ConstChoices):
    A = 1, 'VER'
    B = 2, 'STE'
    c = 3, 'SSS'
    D = 5
    _E = 6, 'ES'
    F = 8
    G = choices.Item(10)
Exemplo n.º 2
0
class DirectionChoices(VerticalChoices):
    E = choices.Item('E', 'east')
    W = choices.Item('W', 'west')
Exemplo n.º 3
0
class VerticalChoices(choices.ConstChoices):
    S = choices.Item('S', 'south')
    N = choices.Item('N', 'north')
Exemplo n.º 4
0
class OffsetChoices(choices.ConstChoices):
    up = choices.Item((0, -1), 'Up')
    down = choices.Item((0, 1), 'Down')
    left = choices.Item((-1, 0), 'Left')
    right = choices.Item((0, 1), 'Right')
Exemplo n.º 5
0
class GenderChoices(choices.ConstChoices):
    male = choices.Item('male', 'Male')
    female = choices.Item('female', 'Female')
    unknown = choices.Item('unknown', 'Unknown')
Exemplo n.º 6
0
class OrderTestChoices(VerticalChoices):
    N = choices.Item('n', 'North', order=-1)
Exemplo n.º 7
0
class GenderChoices(choices.ConstChoices):
    MALE = choices.Item(1, 'Male')
    FEMALE = choices.Item(2, 'Female')
    UNKNOWN = choices.Item(3, 'Unknown')