Changes between Version 7 and Version 8 of new_meta_api
- Timestamp:
- Jul 11, 2014, 6:18:19 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
new_meta_api
v7 v8 127 127 In this case, Person has no related objects, but it has 1 proxied related object from RelationToProxy. 128 128 129 === The new API 130 The new API is composed of 2 main functions: get_fields, and get_field. 129 131 132 ==== get_fields(m2m, data, related_m2m, related_objects, virtual, include_parents, include_non_concrete, include_hidden, include_proxy) 130 133 131 132 133 - Soc Status (second deliverable) 134 - Why 135 136 -The API 137 - get_fields 138 - get_field 139 140 - Fast access Calls 141 - fields 142 - 134 get_fields takes a set of flags as parameters, and returns a tuple of field instances that match those parameters. All possible combinations of 135 options are possible here, although some will have no effect (such as include_proxy combined with data or m2m by itself). 136 get_fields is internally cached for speed and a recursive function that collects fields from each parent of the model. 137 An example of every (sane) combination of flags will be available in the model_meta test suite that I will ship with the new API