在学习《The Definitive Guide to Pylons》过程发现部分信息已经过时,整理如下:
1.Pylons 1.0中routes.url_for被pylons.url代替。如果出现如下错误:
AttributeError: 'thread._local' object has no attribute 'mapper'
需在./lib/helpers.py中添加from pylons import url,并将所有h.url_for()替换为h.url()
2. meta.metadata替换为如下
from quickwiki.model.meta import Base
Base.metadata