我正在开发一个flask应用程序。我决定使用Flask-Security,因为它有很多很棒的特性。然而,除了他们提供给here的QuickStart之外,我很难找到工作代码的示例。具体地说,我需要从Flask-Security使用的Flask-Login插件访问登录管理器。这是否意味着我需要从Flask-Security导入Login-Manager?访问它的最佳方式是什么?
谢谢你的帮助!
发布于 2014-09-20 06:01:59
据我所知,您可以通过以下方式访问登录管理器:
current_app.login_manager从我在Flask-Security文档(http://pythonhosted.org/Flask-Security/api.html)中看到的示例中,它可能会响应该模块文档中的本地Flask-Login方法:
https://flask-login.readthedocs.org/en/latest/#api-documentation
我自己也刚刚开始修补Flask-Security,而且也对缺乏示例和文档感到恼火,所以如果这对><没有帮助,请原谅我
https://stackoverflow.com/questions/25872375
复制相似问题