0
我为烧瓶应用程序编写了自己的验证模块。它还没有准备好,当我在其他模块上工作时可能会很痛苦。我注释掉的代码行,我注册的蓝图:烧瓶 - 检查蓝图是否存在
# app.register_blueprint(auth_module)
但如何我检查,看看是否在另一个控制器存在此模块:
/mod_home/controllers.py
:
@mod_home.route('', methods=['GET'])
def index():
# if mod_auth: <-- THIS LINE???
# check if user is logged in, redirect if needed
# else:
return render_template('index.html')
好了,我找到了答案......不知道我是否应该关闭的问题或答案呢? – Jeff
你最好发布答案,这完全没问题 –