Changes between Version 6 and Version 7 of S3/S3Hierarchy
- Timestamp:
- 05/21/14 21:30:22 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3Hierarchy
v6 v7 41 41 [[Image(hierarchy_data_model.png)]] 42 42 43 A typical data model for a hierarchical taxonomy could look like: 44 45 {{{#!python 46 tablename = "org_facility_type" 47 define_table(tablename, 48 Field("name", 49 ), 50 # The parent-field for the hierarchy: 51 Field("parent", "reference org_facility_type", 52 ), 53 s3_comments(), 54 *s3_meta_fields() 55 ) 56 self.configure(tablename, 57 hierarchy = "parent", 58 ) 59 }}} 43 60 == Configuration == 44 61