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

def _get_forward_relationships(opts):
    """
    Returns an `OrderedDict` of field names to `RelationInfo`.
    """
    forward_relations = OrderedDict()
    for field in [field for field in opts.fields if field.serialize and field.rel]:
        forward_relations[field.name] = RelationInfo(
            model_field=field,
            related_model=_resolve_model(field.rel.to),
            to_many=False,
            to_field=_get_to_field(field),
            has_through_model=False
        )

    # Deal with forward many-to-many relationships.
    for field in [field for field in opts.many_to_many if field.serialize]:
        forward_relations[field.name] = RelationInfo(
            model_field=field,
            related_model=_resolve_model(field.rel.to),
            to_many=True,
            # manytomany do not have to_fields
            to_field=None,
            has_through_model=(
                not field.rel.through._meta.auto_created
            )
        )

    return forward_relations