[Django] #27380: Add the 'raw' argument with the 'm2m_changed' signal

35 views
Skip to first unread message

Django

unread,
Oct 24, 2016, 3:29:38 PM10/24/16
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
----------------------------------------------+--------------------
Reporter: Élie Bouttier | Owner: nobody
Type: New feature | Status: new
Component: Database layer (models, ORM) | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
The 'raw' argument is sent with pre_save and post_save signals in order to
detect fixture loading and avoid un-needed operations in this case.
Unfortunatly, this argument is not sent with m2m_changed signal !
I find a work-around on stack-overflow for tests which consist in
disconnecting the m2m_signal in the setUpClass.
However, this is not applicable for loaddata management command.

Please send the 'raw' argument with the m2m_changed signal, this is
needed!

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

Django

unread,
Oct 24, 2016, 3:41:58 PM10/24/16
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------

Reporter: Élie Bouttier | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

This was also proposed in #17583 which was marked as a duplicate of #8399
but I don't see an elegant solution in that ticket, so maybe it's time to
accept this.

--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:1>

Django

unread,
Oct 26, 2016, 12:27:46 PM10/26/16
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------

Reporter: Élie Bouttier | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:2>

Django

unread,
Aug 1, 2017, 8:04:49 AM8/1/17
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------

Reporter: Élie Bouttier | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by direx):

* cc: direx (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:3>

Django

unread,
Nov 7, 2025, 5:02:22 AM11/7/25
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------
Reporter: Élie Bouttier | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1
* owner: nobody => Mariusz Felisiak
* status: new => assigned

Comment:

[https://github.com/django/django/pull/20067 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:4>

Django

unread,
Dec 16, 2025, 4:06:48 PM12/16/25
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------
Reporter: Élie Bouttier | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:5>

Django

unread,
Dec 17, 2025, 11:37:34 AM12/17/25
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------
Reporter: Élie Bouttier | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:6>

Django

unread,
Dec 17, 2025, 11:51:44 AM12/17/25
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------
Reporter: Élie Bouttier | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:7>

Django

unread,
Dec 17, 2025, 12:37:28 PM12/17/25
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------
Reporter: Élie Bouttier | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"6fc2406fc534f97f245b8267703ab598a020fee5" 6fc2406]:
{{{#!CommitTicketReference repository=""
revision="6fc2406fc534f97f245b8267703ab598a020fee5"
Refs #27380 -- Made ManyRelatedManager.set() use *_base() hooks.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:9>

Django

unread,
Dec 17, 2025, 12:37:28 PM12/17/25
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------
Reporter: Élie Bouttier | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"c3b6c2969171d8867308406bb03d60f86a422904" c3b6c296]:
{{{#!CommitTicketReference repository=""
revision="c3b6c2969171d8867308406bb03d60f86a422904"
Refs #27380 -- Made ManyRelatedManager.add()/clear()/remove()
implementation more consistent.

This also adds _add_base(), _clear_base(), and _remove_base() internal
hooks.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:8>

Django

unread,
Dec 17, 2025, 12:37:28 PM12/17/25
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------
Reporter: Élie Bouttier | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"4702b36120ea4c736d3f6b5595496f96e0021e46" 4702b36]:
{{{#!CommitTicketReference repository=""
revision="4702b36120ea4c736d3f6b5595496f96e0021e46"
Fixed #27380 -- Added "raw" argument to m2m_changed signals.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:11>

Django

unread,
Dec 17, 2025, 12:37:30 PM12/17/25
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------
Reporter: Élie Bouttier | Owner: Mariusz
| Felisiak
Type: New feature | Status: assigned
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"12d574407c466c7929e455cfcfef4c0ff564e465" 12d5744]:
{{{#!CommitTicketReference repository=""
revision="12d574407c466c7929e455cfcfef4c0ff564e465"
Refs #27380 -- Added ManyRelatedManager.set_base() hook.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:10>

Django

unread,
Dec 19, 2025, 2:02:38 PM12/19/25
to django-...@googlegroups.com
#27380: Add the 'raw' argument with the 'm2m_changed' signal
-------------------------------------+-------------------------------------
Reporter: Élie Bouttier | Owner: Mariusz
| Felisiak
Type: New feature | Status: closed
Component: Database layer | Version: 1.10
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):

In [changeset:"5a851bdbfcd627865df7289197190c52221ca070" 5a851bdb]:
{{{#!CommitTicketReference repository=""
revision="5a851bdbfcd627865df7289197190c52221ca070"
Refs #27380 -- Added release note for raw argument to m2m_changed signal.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27380#comment:12>
Reply all
Reply to author
Forward
0 new messages