How to use Flask-Security register view?

后端 未结 3 873
渐次进展
渐次进展 2021-02-12 17:28

Has anyone used Flask-Security extension for authentication? How do I get register view to work?

http://packages.python.org/Flask-Security/customizing.html

3条回答
  •  孤城傲影
    2021-02-12 18:12

    I have not really used Flask-Security but the Builderror is referring to the fact that flask cannot bind the security.register view to a URL. security is the name of the blueprint. So may I suggest you try to call the view as follows. Instead of app.route, use security.route.

    @security.route('/register', methods=['GET'])
    def register():
        return render_template('security/register_user.html')
    

提交回复
热议问题