Opened 13 years ago

Closed 12 years ago

#18454 closed New feature (fixed)

Add ability to pass several signals to `receiver`

Reported by: dmedvinsky Owned by: dmedvinsky
Component: Core (Other) Version: 1.4
Severity: Normal Keywords: signal, receiver
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Pull Request: https://github.com/django/django/pull/136

This adds ability to use receiver in the following way:

@receiver([post_save, post_delete], sender=MyModel)
def signals_receiver(sender, **kwargs):
    ...

Quite often I want to connect both post_save and post_delete signals
for some particular sender.

Change History (1)

comment:1 by Florian Apolloner <florian@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [d4da08375b634544b95859d4d4667b8f05e3a29a]:

Fixed #18454 -- Added ability to pass a list of signals to receiver.

Added ability to use receiver decorator in the following way:

@receiver([post_save, post_delete], sender=MyModel)
def signals_receiver(sender, kwargs):

...

Note: See TracTickets for help on using tickets.
Back to Top