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()
百度了好久没找到答案,初学,求解
在这个学习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()
百度了好久没找到答案,初学,求解
...全文
相关推荐
PYH:csc学习过程
**面向对象编程**:Python是面向对象的语言,支持类(class)和对象(object)的概念。
简明 Python 教程
Python的错误类型丰富,如ZeroDivisionError、TypeError等,合理的异常处理可以使程序更加健壮。
python-basics:基于Google的Python类
Python有五种内置的数据类型:整型(int)、浮点型(float)、字符串(str)、布尔型(bool)和列表(list)。
吉米学习Python
**数据类型**:Python内建了多种数据类型,如整型(int)、浮点型(float)、字符串(str)、布尔型(bool)和空值(NoneType)。
python:学习python
Python标准库提供了丰富的内置异常类型,如ValueError、TypeError和IOError等。


