mirror of
https://github.com/django/django.git
synced 2025-09-26 20:19:16 +00:00
Fixed #13087 -- Modified m2m signals to provide greater flexibility over exactly when notifications are delivered.
This is a BACKWARDS INCOMPATIBLE CHANGE for anyone using the signal names introduced in r12223. * If you were listening to "add", you should now listen to "post_add". * If you were listening to "remove", you should now listen to "post_remove". * If you were listening to "clear", you should now listen to "pre_clear". You may also want to examine your code to see whether the "pre_add", "pre_remove" or "post_clear" would be better suited to your application. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
539cfe8cb7
commit
273a002544
3 changed files with 170 additions and 27 deletions
|
@ -201,12 +201,18 @@ Arguments sent with this signal:
|
|||
A string indicating the type of update that is done on the relation.
|
||||
This can be one of the following:
|
||||
|
||||
``"add"``
|
||||
``"pre_add"``
|
||||
Sent *before* one or more objects are added to the relation
|
||||
``"post_add"``
|
||||
Sent *after* one or more objects are added to the relation
|
||||
``"remove"``
|
||||
``"pre_remove"``
|
||||
Sent *after* one or more objects are removed from the relation
|
||||
``"clear"``
|
||||
``"post_remove"``
|
||||
Sent *after* one or more objects are removed from the relation
|
||||
``"pre_clear"``
|
||||
Sent *before* the relation is cleared
|
||||
``"post_clear"``
|
||||
Sent *after* the relation is cleared
|
||||
|
||||
``reverse``
|
||||
Indicates which side of the relation is updated (i.e., if it is the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue