#18094: `pre_delete` and `post_delete` signals are not correctly sent in
inheritance scenarios involving proxy models
-------------------------------------+-------------------------------------
     Reporter:  charettes            |                    Owner:  charettes
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:  model proxy multi-   |  Unreviewed
  table inheritance signals delete   |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by akaariai):

 One more point: I don't believe the signals should be propagated to the
 proxy-leaf direction. To the other way, sure. But you should be able to
 define signals for proxy models which are specifically not sent when the
 parent model is deleted. Subclasses specialize behavior, and you can't do
 that for signals if they are always fired.

 What is the use case for reverse-propagation which is not better served by
 attaching directly to the concrete parent .delete()?

 The current behavior of model signals is:
   - save: just for the actual saved model
   - init: just for the actual initialized model
   - delete: for the actual deleted model + all its parent models in the
 multitable inheritance chain.

 So, unifying those without breaking backwards compatibility for any of
 them seems a bit hard. If at all possible it should be done, the question
 is if it is possible?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18094#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

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

Reply via email to