class MyModel(models.Model):
     testInitializeFieldWithUndefinedField = models.Field()
 class MyModel2(models.Model):
     testInitializeWithNullField = models.Field(default=None)
 class MyModel(models.Model):
     hi = models.Field('name', default='Hello')
        class MyModel(models.Model):
            __lc_cls__ = 'TestModel'

            name = models.Field(default=lambda: '12345')
Пример #5
0
 class PersonB(models.Model):
     __lc_cls__ = self.cls_names[2]
     none_initialized_field = models.Field(default=None)
Пример #6
0
 class PersonA(models.Model):
     __lc_cls__ = self.cls_names[1]
     undefined_initialized_field = models.Field()
Пример #7
0
 class Person(models.Model):
     __lc_cls__ = self.cls_name
     other_name = models.Field('name', default='Hello')