Changes between Version 7 and Version 8 of new_meta_api


Ignore:
Timestamp:
Jul 11, 2014, 6:18:19 AM (10 years ago)
Author:
pirosb3
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • new_meta_api

    v7 v8  
    127127In this case, Person has no related objects, but it has 1 proxied related object from RelationToProxy.
    128128
     129=== The new API
     130The new API is composed of 2 main functions: get_fields, and get_field.
    129131
     132==== get_fields(m2m, data, related_m2m, related_objects, virtual, include_parents, include_non_concrete, include_hidden, include_proxy)
    130133
    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  -
     134get_fields takes a set of flags as parameters, and returns a tuple of field instances that match those parameters. All possible combinations of
     135options are possible here, although some will have no effect (such as include_proxy combined with data or m2m by itself).
     136get_fields is internally cached for speed and a recursive function that collects fields from each parent of the model.
     137An example of every (sane) combination of flags will be available in the model_meta test suite that I will ship with the new API
Back to Top