diff --git a/cookbook/Insert.zh-cn.md b/cookbook/Insert.zh-cn.md index 41a646e0..e88edfd3 100644 --- a/cookbook/Insert.zh-cn.md +++ b/cookbook/Insert.zh-cn.md @@ -5,10 +5,10 @@ title: db.insert 向数据库中新增数据 # db.insert 向数据库中新增数据 -###问题 +### 问题 如何向数据加新增数据? -###解决办法 +### 解决办法 在 0.3 中,数据库连接如下: @@ -28,18 +28,17 @@ sequence_id = db.insert('mytable', firstname="Bob",lastname="Smith",joindate=web * _test * \**values - -##tablename +## tablename 表名,即你希望向哪个表新增数据。 -##seqname +## seqname 可选参数,默认 None。Set `seqname` to the ID if it's not the default, or to `False`. -##_test +## _test `_test` 参数可以让你看到 SQL 的执行过程: results = db.select('mytable', offset=10, _test=True) > -##\**values +## \**values 字段参数。如果没有赋值,数据库可能创建默认值或者发出警告。 diff --git a/cookbook/alternating_style.md b/cookbook/alternating_style.md index 4398c448..69774258 100644 --- a/cookbook/alternating_style.md +++ b/cookbook/alternating_style.md @@ -13,7 +13,6 @@ Solution: Give templetor access to the `int` built-in and use modulo to test. web.template.Template.globals['int'] = int - ## template.html ## - ## New Templetor ## In the new implementation of templetor (which will be the default when version .3 is released), within any template loop you have access to a $loop variable. This works like so: - - diff --git a/cookbook/alternating_style.zh-cn.md b/cookbook/alternating_style.zh-cn.md index 3d6bd22b..a6bb8365 100644 --- a/cookbook/alternating_style.zh-cn.md +++ b/cookbook/alternating_style.zh-cn.md @@ -33,12 +33,10 @@ web.template.Template.globals['int'] = int ">$track.title - ## New Templetor ## In the new implementation of templetor (which will be the default when version .3 is released), within any template loop you have access to a $loop variable. This works like so: -