#33369: Add through_defaults as argument for m2m_changed signal
-------------------------------------+-------------------------------------
     Reporter:  ShmuelTreiger        |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  m2m_changed          |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Thanks for the report , however the `m2m_changed` signal was created for
 automatically created intermediate models. If you have an explicit
 `through` model, you can attached `Model` signals to it, i.e. `pre_save`,
 `post_save`, `pre_delete`, and `post_delete`. Personally, I would use add
 this logic to the
 
[https://docs.djangoproject.com/en/4.0/ref/models/instances/#django.db.models.Model.save
 Domain_Policy_m2m.save()] and don't use signals at all, this is not a
 situation where signals are needed. If have further questions, see
 TicketClosingReasons/UseSupportChannels for ways to get help.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33369#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/071.a827f7d8c06973b61708adaa8a9d1d0b%40djangoproject.com.

Reply via email to