old_contents: from django.db import models
  from django.contrib.contenttypes.fields import GenericForeignKey
  from django.contrib.contenttypes.models import ContentType
  
  
  class Index(models.Model):
      # configuration
  
      content_type = models.ForeignKey(ContentType)
      object_id = models.PositiveIntegerField()
      content_object = GenericForeignKey('content_type', 'object_id')
  
      # title =
      # content =
  
      # title_search
      # content_search
  
new_contents: from django.contrib.contenttypes.fields import GenericForeignKey
  from django.contrib.contenttypes.models import ContentType
  from django.db import models
  
  
  class Index(models.Model):
      # configuration
  
      content_type = models.ForeignKey(ContentType)
      object_id = models.PositiveIntegerField()
      content_object = GenericForeignKey('content_type', 'object_id')
  
      # title =
      # content =
  
      # title_search
      # content_search
  
subject: Reorder imports.