Django: copy model instance atsmin2015年6月9日2015年6月9日 Django, python No Comments To copy model instance, replacing pk value is the easiest way. obj = Foo.objects.get(pk="foo") obj.pk = "bar" obj.save() http://stackoverflow.com/questions/4733609/how-do-i-clone-a-django-model-instance-object-and-save-it-to-the-database ← Python: get post parameters from response object (requests) Python: calculate weeks or months → Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment Name * Email * Website