On Dec 3, 12:53 pm, "eric.frederich" <eric.freder...@gmail.com> wrote:
>
...
>
> The problem now it that when I delete an Offering object through the
> Django admin it cascade deletes the Enrollment objects as it should
> but it is not calling the delete method and thus restoring their
> interest.
>
> When deleting an Enrollment through the admin it calls the delete
> method but not on cascades.
>
> Is it documented anywhere that this is the behavior?  I noticed that
> the post_save signal is being dispatched on each of those so I could
> re-factor my code.  But I'm curious... is it documented?  Is this a
> bug?

The admin app uses the bulk delete method when cascading. I'm not sure
that is documented. But bulk delete behavior is documented:

http://docs.djangoproject.com/en/dev/topics/db/queries/#deleting-objects

See also the warning under admin actions:

http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/#admin-actions

You could create your own admin action to do the delete any way you
want.

Best regards,
BN

--

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


Reply via email to