Changes between Version 5 and Version 6 of DeveloperGuidelines/Web2pyInternalsAndTips
- Timestamp:
- 01/05/13 08:54:00 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Web2pyInternalsAndTips
v5 v6 11 11 }}} 12 12 13 Get names of fields in a Table:13 Get names of fields in a table: 14 14 {{{ 15 15 table.fields() 16 16 }}} 17 17 18 Get Field objects from a Table (field name in {{{fieldname}}}):18 Get Field objects from a table (field name in {{{fieldname}}}): 19 19 {{{ 20 20 table[fieldname] 21 }}} 22 23 Read out the whole table: 24 {{{ 25 table._db().select(table.ALL) 26 }}} 27 28 Clear the table (caution, requires foreign key constraints turned off): 29 {{{ 30 table.truncate() 21 31 }}} 22 32 === Field ===