DEV Community

Discussion on: Soft Deletes in Django

Collapse
jhelberg profile image
Joost Helberg

Nice article and an important subject. A more sophisticated pattern is to implement a valid timestamp-range to allow a certain object to be valid for some timestamps and not valid for others. Implementation is similar to the above, with different operators and a lot more functionality.

Collapse
bikramjeetsingh profile image
Bikramjeet Singh Author

Thanks Joost! The valid timestamp range pattern is an interesting extension of the soft deletion functionality. I suppose it will give us the capability to view the complete history if the object has been deleted and restored multiple times, am I right?

Collapse
jhelberg profile image
Joost Helberg

Yes, if you use an array of timestamp ranges, anything is possible.