Re: How to disable deletion af a model instance

2009-05-10 Thread Praveen
Hi, i do not know how its going to achieve but in my case. For each payment entry i will add delete button and will disable the default django admin interface. Create a separate GroupProfile class class GroupProfile(models.Model): name = models.CharField(_('name'), max_length=80, unique=True)

Re: How to disable deletion af a model instance

2009-05-09 Thread Margie
I thought that might be the case. Is that true of the deletes done by a formset save as well? IE, when a formset.save() is done, in some cases my delete will be called, and in some cases not? Margie On May 9, 4:57 pm, James Bennett wrote: > On Sat, May 9, 2009 at 7:49 PM, George Song wrote:

Re: How to disable deletion af a model instance

2009-05-09 Thread James Bennett
On Sat, May 9, 2009 at 7:49 PM, George Song wrote: > I think if you want to know definitively if your `delete()` method is > being called or not, your debug statement should go in that method. I > wouldn't be surprised if Django is sending pre and post delete signals > even during bulk deletion.

Re: How to disable deletion af a model instance

2009-05-09 Thread George Song
On 5/9/2009 12:34 PM, Margie wrote: > I've had my share of confusion over delete. Here's a thread that I > had with Malcolm recently: > > http://groups.google.com/group/django-users/browse_thread/thread/582f21486c1073eb/7f5743953047d9fa?lnk=raot&fwc=1 > > However, I guess I'm still quite confus

Re: How to disable deletion af a model instance

2009-05-09 Thread Margie
I've had my share of confusion over delete. Here's a thread that I had with Malcolm recently: http://groups.google.com/group/django-users/browse_thread/thread/582f21486c1073eb/7f5743953047d9fa?lnk=raot&fwc=1 However, I guess I'm still quite confused. One thing I don't understand is when the "b

Re: How to disable deletion af a model instance

2009-05-09 Thread Rune Bromer
On May 9, 5:33 pm, George Song wrote: > On 5/9/2009 7:14 AM, Rune Bromer wrote: > > Hi, > > If you already did an override on `Payment.delete()`, then you should be > fine. > > Although be mindful of bulk delete, as it doesn't use `Model.delete()`: >

Re: How to disable deletion af a model instance

2009-05-09 Thread George Song
On 5/9/2009 7:14 AM, Rune Bromer wrote: > Hi, > > I run a small project handling payments from users. Each user has the > possibility to delete their account and if they do I have to keep > their payment data. Also, I would like to disable admins from deleting > the data as there are NEVER a vali

How to disable deletion af a model instance

2009-05-09 Thread Rune Bromer
Hi, I run a small project handling payments from users. Each user has the possibility to delete their account and if they do I have to keep their payment data. Also, I would like to disable admins from deleting the data as there are NEVER a valid reason to do so. The payment model has foreign key