Changes between Version 6 and Version 7 of S3/S3Hierarchy


Ignore:
Timestamp:
05/21/14 21:30:22 (8 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Hierarchy

    v6 v7  
    4141[[Image(hierarchy_data_model.png)]]
    4242
     43A 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}}}
    4360== Configuration ==
    4461