views:

701

answers:

1

Just wondering if there is an easy way to add the functionality to duplicate an existing listing in the admin interface?

In data entry we have run into a situation where a lot of items share generic data with another item, and to save time it would be very nice to quickly duplicate an existing listing and only alter the changed data. Using a better model structure would be one way of reducing the duplication of the data, but there may be situation where the duplicated data needs to be changed on an individual basis in the future.

+9  A: 

You can save as by just enabling adding this to your ModelAdmin:

save_as = True

This replaces the "Save and add another" button with a "Save as" button. "Save as" means the object will be saved as a new object (with a new ID), rather than the old object.

Harley
"save_as = True" is added to the ModelAdmin, not to the model.
Carl Meyer