问题
I want to receive the user_registered signal from Flask-Security and have to set up like so:
from flask.ext.security.signals import user_registered
@user_registered.connect_via(app)
def user_registered_sighandler(sender, **extra):
sender.logger.debug("logger-user_registered_sighandler:", extra)
print "print-user_registered_sighandler:", extra
But my signal handler is not being called when a new user is registered. I've set up a Flask (not Flask-Security) signal similar to above that does work. Can anyone help with this?
I'm using: Flask==0.9, Flask-Security==1.5.4, blinker==1.2
回答1:
This was a bug fixed in v1.6.1 of Flask-Security
来源:https://stackoverflow.com/questions/15060849/not-getting-signal-from-flask-security