Where are you coding that signal callback? Are you importing the module where you register the callback before the signal gets sent?
For example, I have used signals and code the in my_app/signals.py
. Later, I go to my_app/models.py
and add the line:
import my_app.signals
The file where you write your callbacks must be imported before the signals raises:
Where should this code live? You can put signal handling and registration code anywhere you like. However, you’ll need to make sure that the module it’s in gets imported early on so that the signal handling gets registered before any signals need to be sent. This makes your app’s models.py a good place to put registration of signal handlers.
Also you can try to register with the @register
decorator. It is pretty much the same but you can try to see if it works the other way:
from django_openid_auth.signals import openid_login_complete
from django.dispatch import receiver
@receiver(openid_login_complete)
def update_request(sender, **kwargs):
logger.debug('test')
Hope that helps!