Example #1
0
        class MyModelWithInvalidMaxLength(models.Model):
            enum = django_enums.EnumField(
                self.enum_class,
                max_length=0,
            )

            class Meta:
                app_label = 'foo'
Example #2
0
        class MyModelWithInvalidDefault(models.Model):
            enum = django_enums.EnumField(
                self.enum_class,
                default='bar',
                max_length=32,
            )

            class Meta:
                app_label = 'foo'
Example #3
0
        class MyModel(models.Model):
            enum = django_enums.EnumField(
                MyEnum,
                default=MyEnum.BAR,
                max_length=32,
            )

            class Meta:
                app_label = 'foo'