def _get_forward_relationships(opts):
 forward_relations = OrderedDict()
 for field in [field for field in opts.fields if (field.serialize and get_remote_field(field))]:
  forward_relations[field.name] = RelationInfo(model_field=field, related_model=get_related_model(field), to_many=False, to_field=_get_to_field(field), has_through_model=False, reverse=False)
 for field in [field for field in opts.many_to_many if field.serialize]:
  forward_relations[field.name] = RelationInfo(model_field=field, related_model=get_related_model(field), to_many=True, to_field=None, has_through_model=(not get_remote_field(field).through._meta.auto_created), reverse=False)
 return forward_relations

def _get_forward_relationships ( opts ) : forward_relations = OrderedDict ( ) for field in [ field for field in opts . fields if ( field . serialize and get_remote_field ( field ) ) ] : forward_relations [ field . name ] = RelationInfo ( model_field = field , related_model = get_related_model ( field ) , to_many = False , to_field = _get_to_field ( field ) , has_through_model = False , reverse = False ) for field in [ field for field in opts . many_to_many if field . serialize ] : forward_relations [ field . name ] = RelationInfo ( model_field = field , related_model = get_related_model ( field ) , to_many = True , to_field = None , has_through_model = ( not get_remote_field ( field ) . through . _meta . auto_created ) , reverse = False ) return forward_relations
returns an ordereddict of field names to relationinfo .