Wiadomość napisana w dniu 2009-09-07, o godz. 11:11, przez lzantal: > I need to save_as in the model of my app So I can save existing > records as new ones. > I know there is an option in modeladmin but I don't have an admin > interface for this app. > Tryed calling force_insert on the save method with no success.
You can clear the value of pk in the save() method: self.pk = None super(MyModel, self).save(*args, **kw) -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R&D, Redefine jarek.zg...@redefine.pl --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---