Reputation: 3955
How would you duplicate a data entry in Django/
The model has data in it. What would be the best way to save an entire model entry into new record and update id to new one.
Upvotes: 2
Views: 2007
Reputation: 2266
Sounds like you need:
http://docs.djangoproject.com/en/1.2/ref/models/instances/#forcing-an-insert-or-update
Upvotes: 0
Reputation: 8346
The first page in search results, seems to do the thing you need: http://djangosnippets.org/snippets/1040/
Upvotes: 2