Code

Opened 3 years ago

Closed 3 years ago

#16634 closed Bug (duplicate)

"m2m_changed" signals never gets fired from the admin site

Reported by: f3r-_-@… Owned by: nobody
Component: contrib.admin Version: 1.3
Severity: Normal Keywords: signals
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Well, dont know if this is a bug or if I've a concept error. But try to test it:

A simple generic test:

from django.dispatch import receiver
from django.db.models.signals import m2m_changed

@receiver(m2m_changed)
def test_handler(sender, instance, action, reverse, model, pk_set, **kwargs):
     import sys
     print>>sys.stderr, action

Add this snippet to your code and try to edit a model from the admin that contains a m2m relation. You can add or delete an object to the relationship. Then, you will see that the signal doesn't fire: S

Instead, if you do the same from a shell ... everything works fine.

Could anyone try it and confirm it is not a paranormal activity at my computer?

Thanks in advance.

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

I think this problem was already reported in #16073.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.