So every model comes with some commonly used functions such as save and delete.
Delete is often overridden to set a boolean field such as is_active
to false, this way data is not lost. But sometimes a model exists that has information that, once created, should always exist and never even be "inactive". I was wondering what the best practice for handling this model's delete
method would be?
ideas
make it simply useless:
def delete(self):
return False
but that just seems odd. Is there maybe a Meta
option to disable deleting? is there any "nice" way to do this?