赞
踩
使用flask布置web时,current_user.is_authenticated()出现错误:
AttributeError: 'bool' object has no attribute '__call__'
解决方法:
flask-login的版本问题,flask-login2.x是current_user.is_authenticated(),flask-login3.x是current_user.is_authenticated。避免这个问题最好的办法就是使用虚拟环境并在requirement中写明版本号。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。