About Object Duplication in Django

You can create a copy of Django model instance, by assigning its pk to None and saving the instance:

1
2
obj.pk = None
obj.save()

If there are any many-to-many or many-to-one relationships, you will have to copy them from the original manually.

Tips and Tricks Programming Django 4.2 Django 3.2 Django 2.2