Thanks Guys,
for your responses. I used the pre_delete signal. When i delete a
participant object via admin interface, the related Data Instances are
also deleted and pre_delete is called. That work s for me pretty
good.
Many thanks,
Dan
--~--~-~--~~~---~--~~
You
My fault, I must have skipped right over that part. It seems that it
*does* send pre_delete and post_delete signals, but does not call
custom delete methods
On Jun 17, 9:51 am, Daniel Hepper <[EMAIL PROTECTED]> wrote:
> > It isn't very clear from that sentence which of the two methods Django
> >
> It isn't very clear from that sentence which of the two methods Django
> uses to delete those child records, but looking at the code, it seems
> to be method #2. Since it's using the more-efficient batch delete, no
> custom delete methods are being called, no signals are being sent,
> which is e
The main issue here is that there are two types of batch deletes in
Django:
1. You can query for the models you want to delete, loop through the
queryset, and delete them each individually. Your custom delete
methods (if any) will get called, and you'll get pre_delete and
post_delete signals. Tha
Cool!
Thank you very much for your response. i ll use signals!
regards
Dan
--~--~-~--~~~---~--~~
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
AFAIK, related models are not deleted by invoking delete().
A better way to recognize deletion is the use of signals, i.e.
pre_delete and post_delete
http://code.djangoproject.com/wiki/Signals
Hope that helps.
Regards,
Daniel
Am Dienstag, den 17.06.2008, 02:54 -0700 schrieb Daniel Austria:
>
Hi there,
got a Problem. Maybe someone knows a solution.
I have a model Data which is linked via a foreignkey to the model
Participant.
I have overwritten the delete() Method in the model Data.
When i delete a instance of Data via the Admin-Interface, delete() is
called appropriately.
When i del
7 matches
Mail list logo