79094278

Date: 2024-10-16 13:32:14
Score: 3
Natty:
Report link

In Django 5.1 you should set obj.pk=None and obj._state.adding = True, then obj.save() See more in docs.djangoproject.com/en/5.1/topics/db/queries/#copying-model-instances

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Alfred Hedgehog