In a weak moment yesterday, I typed in a console instead of
note.bursts.clear()
a terrible mistake
note.bursts.all().delete()

Notes are comments linking to one or more principal objects, which are
Bursts. Luckily, this specific note was not related to many of them,
but I started thinking of a way of protecting my principle data
objects from accidental deletions like this one. I first simply
redefined Burst's default delete() method to something like
delete(self,really=False) which works in individual cases but not for
the case above, when delete is a method of
QuerySet, which through delete_objects() is accessing database
directly.

Can somebody think of a way of blocking this default behavior (i don't
mind much other classes in my models, but Bursts are the most
difficult to reconstruct) without touching the trunk code? Thanks..

F.M.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to