          forward_relations[field.name] = RelationInfo(
              model_field=field,
              related_model=_resolve_model(field.rel.to),
              to_many=False,
              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]:
 
</s>
            to_field=_get_to_field(field),
          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]:
keep keep keep add keep keep keep keep keep
 Added support for the to_field on ForeignKey fields
rest_framework/utils/model_meta.py