Re:The trouble with soft delete
by truebosko on Saturday November 21, 2009 @10:20PM
(#955352)
I read this article and the entire time I was thinking how easy this problem is solved with a good ORM, like in Django.
All I do is setup two managers, one the default so in the admin I can browse my records without any filtering and then a second one which I use exclusively in my views that simply adds .filter(hidden=False) to the get_query_set method. So simple, and have never ran into any problems.
All I do is setup two managers, one the default so in the admin I can browse my records without any filtering and then a second one which I use exclusively in my views that simply adds .filter(hidden=False) to the get_query_set method. So simple, and have never ran into any problems.