Not getting signal from Flask-Security

你离开我真会死。 提交于 2020-01-05 04:42:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!