3 from ugit
.model
import Model
5 class TestModel(Model
):
7 duck
= Model().create(sound
='quack',name
='ducky')
8 goose
= Model().create(sound
='cluck',name
='goose')
12 mylist
=[duck
,duck
,goose
]
15 self
.set_mylist([duck
,duck
,goose
, 'meow', 'caboose',42])
21 class InnerModel(Model
):
23 self
.create(foo
= 'bar')
25 class NestedModel(Model
):
30 normaList
= [ 1,2,3, [4,5, [6,7,8], 9]],
32 self
.innerList
.append(InnerModel())
33 self
.innerList
.append([InnerModel()])
34 self
.innerList
.append([[InnerModel()]])
35 self
.innerList
.append([[[InnerModel(),InnerModel()]]])
36 self
.innerList
.append({"foo": InnerModel()})