Copy and edit data to another model.

Hi, I’m looking for assistance to work out this logic in Django.

I’m building an app to create service proposals.
I want users to have a library of ‘template services’ which is in its own model.
When the user is building the proposal, I have a dropdown form that’s initiated with the ‘template services’.

Where I’m getting stuck is that when the user selects the template service, I want to copy the data (title, description, price etc) into another model called ‘selected services’ that’s related to the proposal.

The reason for this logic is I want the user to have a library of regular services they use, but when it is copied over to the proposal they can edit the service without affecting the template services.

Any ideas on how to achieve a copy function or a better way of achieving this? Thank you.

One of the easiest ways to do this is to create the form using the template as the initial data for the form. The specifics to this are going to depend upon exactly how your workflow is implemented.

Hi Ken,
Thank you, I’ll explore this further.