python-flask 教程学习过程遇到难题TypeError: 'bool' object is not callable

qq_32104291 qq_32104291 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
http://www.oschina.net/translate/the-flask-mega-tutorial-part-vi-profile-page-and-avatars
在这个学习python-flask教程,下载源码运行的时候出现:TypeError: 'bool' object is not callable
错误代码:
@app.before_request

def before_request():

[Open an interactive python shell in this frame] g.user = current_user

if g.user.is_authenticated():

g.user.last_seen = datetime.utcnow()

db.session.add(g.user)

db.session.commit()

百度了好久没找到答案,初学,求解
...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
qq_32104291
脚本语言 37,738 成员 34,208 内容