web.py 笔记

1.涉及到id=‘id’的情况,需要加入  vars=locals()  ,因为id在python里有id() 函数
db.delete('entries', where = 'id = $id', vars = locals())
 
2.页面跳转
raise web.seeother('/')
3.页面循环中取索引
$loop.index0
 
 
http://iysm.net/?p=447
posted @ 2015-01-19 11:56  BiboXie  阅读(189)  评论(0编辑  收藏  举报