学以致用

focus on Python , C++, and some interest in Go and R

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2011年4月17日

摘要: 将代码升级至pylons1.0,原本运行良好的程序报出:AttributeError: 'ContextObj' object has no attribute 'tabs' 异常,经过查询资料得知是pylons1.0相比较0.97做了一些调整,pylons 1.0默认情况下tmpl_context将不再是AttribSafeContextObj,也就是说:访问不存在的属性将产生AttributeError异常,为使用attribute-safe tmpl_context,可以更改config/environment.py,增加config['pylon 阅读全文
posted @ 2011-04-17 11:53 Jerry.Kwan 阅读(582) 评论(0) 推荐(0) 编辑

摘要: Bug 1:在使用webhelpers 1.0 的paginate时碰到了TypeError("Sorry, your collection type is not supported by the paginate module. " "You can either provide a list, a tuple, an SQLAlchemy 0.4 select object or an " "SQLAlchemy 0.4 ORM-query object.")通过跟踪代码,获知是paginate.py 中 get_wrapper 阅读全文
posted @ 2011-04-17 11:44 Jerry.Kwan 阅读(326) 评论(0) 推荐(0) 编辑