#33505: Inconsistent Behavior with Abstract Models and Signals
-------------------------------------+-------------------------------------
Reporter: Ken Weaver | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ken Weaver):
Thanks for the response. The inability to validate sender makes sense.
However, it does still strike me as strange that `sender` is essentially
ignored in the example I gave; is that truly intended behavior?
Replying to [comment:1 Mariusz Felisiak]:
> Thanks for the report. You can create custom signals and send them from
anywhere, so I don't think any validation of a `sender` is feasible here.
When connecting the receivers,
> we don't know if the code sending the signals is reachable. For example,
folks can send built-in signals from abstract models of their own, and
this will work fine. `pre_save`, `post_save`, `pre_delete`, and
`post_delete` signals connected to an abstract models will never be send
(without custom senders) because `save()` and `delete()` methods are not
called on abstract models. I'm afraid that any additional note in docs
will confuse folks even more, however I'd be happy to review your concrete
proposal.
--
Ticket URL: <https://code.djangoproject.com/ticket/33505#comment:2>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.55e44ba516973d33f77edabfbc2f7c37%40djangoproject.com.