Is there a way to list Django signals?

django, django-signals, signals

Solution

It's not really exposed in docs but Signal is just a class that contains a list of receivers which are called on event. You can manually check this list:

from django.db.models.signals import *

for signal in [pre_save, pre_init, pre_delete, post_save, post_delete, post_init, post_syncdb]:
    # print a List of connected listeners
    print(signal.receivers)
        

Problem

Is there a way to see which signals have been set in Django?

Original source