Вы можете использовать сигнал post_save
для его создания, например:
from django.db.models.signals import post_save
from django.dispatch import receiver
class YourModel(models.Model):
auto_field = models.BigIntegerField(null=True, default=None)
@receiver(post_save, sender=YourModel)
def update_auto_field(sender, instance, created, **kwargs):
if created:
instance.auto_field = instance.pk
instance.save()