python-flask 教程学习过程遇到难题TypeError: 'bool' object is not callable
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()
百度了好久没找到答案,初学,求解