class MyModelWithInvalidMaxLength(models.Model): enum = django_enums.EnumField( self.enum_class, max_length=0, ) class Meta: app_label = 'foo'
class MyModelWithInvalidDefault(models.Model): enum = django_enums.EnumField( self.enum_class, default='bar', max_length=32, ) class Meta: app_label = 'foo'
class MyModel(models.Model): enum = django_enums.EnumField( MyEnum, default=MyEnum.BAR, max_length=32, ) class Meta: app_label = 'foo'