gpt4 book ai didi

python - is_authenticated() 引发 TypeError TypeError : 'bool' object is not callable

转载 作者:太空狗 更新时间:2023-10-29 17:22:11 27 4
gpt4 key购买 nike

<分区>

我尝试在 View 中使用 is_authenticated(),但收到错误“TypeError: 'bool' object is not callable”。为什么会出现此错误以及如何解决?

@auth.before_app_request
def before_request():
if current_user.is_authenticated() \
and not current_user.confirmed \
and request.endpoint[:5] != 'auth.' \
and request.endpoint != 'static':
return redirect(url_for('auth.unconfirmed'))

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com