module documentation

Helper function for returning the field information that is associated with a model class. This includes returning all the forward and reverse relationships and their associated metadata. Usage: `get_field_info(model)` returns a `FieldInfo` instance.

Function get_field_info Given a model class, returns a `FieldInfo` instance, which is a `namedtuple`, containing metadata about the various field types on the model including information about their relationships.
Function is_abstract_model Given a model class, returns a boolean True if it is abstract and False if it is not.
Variable FieldInfo Undocumented
Variable RelationInfo Undocumented
Function _get_fields Undocumented
Function _get_forward_relationships Returns an `OrderedDict` of field names to `RelationInfo`.
Function _get_pk Undocumented
Function _get_reverse_relationships Returns an `OrderedDict` of field names to `RelationInfo`.
Function _get_to_field Undocumented
Function _merge_fields_and_pk Undocumented
Function _merge_relationships Undocumented
def get_field_info(model): (source)

Given a model class, returns a `FieldInfo` instance, which is a `namedtuple`, containing metadata about the various field types on the model including information about their relationships.

def is_abstract_model(model): (source)

Given a model class, returns a boolean True if it is abstract and False if it is not.

FieldInfo = (source)

Undocumented

RelationInfo = (source)

Undocumented

def _get_fields(opts): (source)

Undocumented

def _get_forward_relationships(opts): (source)

Returns an `OrderedDict` of field names to `RelationInfo`.

def _get_pk(opts): (source)

Undocumented

def _get_reverse_relationships(opts): (source)

Returns an `OrderedDict` of field names to `RelationInfo`.

def _get_to_field(field): (source)

Undocumented

def _merge_fields_and_pk(pk, fields): (source)

Undocumented

def _merge_relationships(forward_relations, reverse_relations): (source)

Undocumented