1

In my Django app I have a model and there is another model that refers as Foreign key to my model.

For example: Order - the parent model Items - as a child in that order.

What is the easy way to implement functionality for end users to duplicate my order in a way that also all children will get duplicated as well?

Ilya Bibik
  • 3,564
  • 4
  • 20
  • 47

1 Answers1

2

If I understand you correctly - you want to make clone of model instance. Then you can read related documentation section. Also there are a couple of answers on SO related: first, second, third

Community
  • 1
  • 1
valignatev
  • 5,471
  • 8
  • 37
  • 59