Пример #1
0
class DumpAndLoadModel(models.Model):
    text = models.TextField('the näme')
    integer = models.IntegerField('the integer')
    float_ = models.FloatField('the float')
    boolean = models.BooleanField('the boolean')
    list_ = models.ListField('the list', fields=(
        models.IntegerField('the int'),
    ))
    dict_ = models.DictField('the dict', fields=(
        models.TextField('hello', name='hello'),
    ))
Пример #2
0
 class Foo(models.Model):
     dict_ = models.DictField(
         'dict field!', fields=(
             models.IntegerField('ints', name='int'),
             models.TextField('texts', name='text'),
         )
     )
Пример #3
0
 class TestModel(models.Model):
     tags = models.ListField('The tags',
                             fields=(models.IntegerField('doc'),))
Пример #4
0
 class Foo(models.Model):
     name = models.TextField('name')
     age = models.IntegerField('age', default=5)
Пример #5
0
 class Foo(models.Model):
     list_ = models.ListField(
         'list field!', fields=(models.IntegerField('ints!'),))
Пример #6
0
 class TestModel(models.Model):
     age = models.IntegerField(
         'The age', default=20,
         fallbacks=[models.SingleFieldFallback('length')])
Пример #7
0
 class TestModel(models.Model):
     age = models.IntegerField('The age', default=20)