Hi all,
One piece of my model is as follow :
class UpperAbstract(models.Model):
CHOICE_A = 0
CHOICE_B = 1
CHOICE_C = 2
myfield = models.PositiveSmallIntegerField(choices=((CHOICE_A,'A'),(CHOICE_B,"B"),(CHOICE_C,"C")),blank=False)
class Meta:
abstract = True
class Foo(UpperAbstract):
myfield = UpperAbstract.CHOICE_A
I am expecting any instance of Foo being created, to have 'myfield' always and "automatically" set to UpperAbstract.CHOICE_A
In my test the created object as null value and saving it is refused on IntegrityError because 'myfield' cannot be None
thank in advance for any help.
regards
manu