from django.db import models
from enumfields import Enum, EnumField


class MyModel(models.Model):

    class Color(Enum):
        RED = 'r'
        GREEN = 'g'
        BLUE = 'b'

    color = EnumField(Color, max_length=1)

from django.db import models
from enum import Enum
from enumfields import EnumField


class MyModel(models.Model):

    class Color(Enum):
        RED = 'r'
        GREEN = 'g'
        BLUE = 'b'

    color = EnumField(Color, max_length=1)

Use regular Enums in tests
Use regular Enums in tests

  from django.db import models
+ from enum import Enum
- from enumfields import Enum, EnumField
+ from enumfields import EnumField
  
  
  class MyModel(models.Model):
  
      class Color(Enum):
          RED = 'r'
          GREEN = 'g'
          BLUE = 'b'
  
      color = EnumField(Color, max_length=1)
  
Use regular Enums in tests
## Code Before:
from django.db import models
from enumfields import Enum, EnumField


class MyModel(models.Model):

    class Color(Enum):
        RED = 'r'
        GREEN = 'g'
        BLUE = 'b'

    color = EnumField(Color, max_length=1)

## Instruction:
Use regular Enums in tests
## Code After:
from django.db import models
from enum import Enum
from enumfields import EnumField


class MyModel(models.Model):

    class Color(Enum):
        RED = 'r'
        GREEN = 'g'
        BLUE = 'b'

    color = EnumField(Color, max_length=1)
