old_contents: import factory
  
  from django.utils.text import slugify
  
  from .models import (
      Contest,
      Contestant,
      # Performance,
  )
  
  
  class ContestFactory(factory.django.DjangoModelFactory):
      FACTORY_FOR = Contest
  
  
  class ContestantFactory(factory.django.DjangoModelFactory):
      FACTORY_FOR = Contestant
      slug = factory.LazyAttribute(lambda a: slugify(a.name))
  
new_contents: import factory
  
  from .models import (
      Contest,
      Contestant,
      Performance,
  )
  
  
  class ContestFactory(factory.django.DjangoModelFactory):
      FACTORY_FOR = Contest
  
  
  class ContestantFactory(factory.django.DjangoModelFactory):
      FACTORY_FOR = Contestant
  
  
  class PerformanceFactory(factory.django.DjangoModelFactory):
      FACTORY_FOR = Performance
      contest = factory.SubFactory(ContestFactory)
      contestant = factory.SubFactory(ContestantFactory)
  
subject: Add Performance Factory