Replacing delete, with hidden
One fairly common thing on a completed application is the request to hide rows from the database, rather than delete.
Just today I had this problem, and this was solved in just a couple of lines.
These are standard Django functions, nothing custom.
My current model (for example only)
My new model
What is this NotDeleted
?, this is where the magic happens.
This will automatically append deleted=False
to your database query.
If for some reason you need to get deleted items again,
You could create a separate manager, just to show deleted items as well.
For more information on Django database managers, http://docs.djangoproject.com/en/1.0/topics/db/managers/#modifying-initial-manager-querysets