          'no_match': _('Invalid hyperlink - No URL match'),
          'incorrect_match': _('Invalid hyperlink - Incorrect URL match'),
          'configuration_error': _('Invalid hyperlink due to configuration error'),
          'does_not_exist': _("Invalid hyperlink - object does not exist."),
          'invalid': _('Invalid value.'),
      }
  
      def __init__(self, *args, **kwargs):
          try:
              self.view_name = kwargs.pop('view_name')
 
</s> remove         'invalid': _('Invalid value.'),
 </s> add         'incorrect_type': _('Incorrect type.  Expected pk value, received %s.'), </s> remove         'invalid': _('Invalid value.'),
 </s> add         'incorrect_type': _('Incorrect type.  Expected pk value, received %s.'), </s> remove             msg = self.error_messages['invalid']
            raise ValidationError(msg)
 </s> add             msg = self.error_messages['incorrect_type']
            raise ValidationError(msg % type(value).__name__) </s> remove             msg = self.error_messages['invalid']
 </s> add             received = type(data).__name__
            msg = self.error_messages['incorrect_type'] % received
        'incorrect_type': _('Incorrect type.  Expected url string, received %s.'),
          'no_match': _('Invalid hyperlink - No URL match'),
          'incorrect_match': _('Invalid hyperlink - Incorrect URL match'),
          'configuration_error': _('Invalid hyperlink due to configuration error'),
          'does_not_exist': _("Invalid hyperlink - object does not exist."),
        'incorrect_type': _('Incorrect type.  Expected url string, received %s.'),
      }
  
      def __init__(self, *args, **kwargs):
          try:
              self.view_name = kwargs.pop('view_name')
keep keep keep keep replace keep keep keep keep keep
 Raise Validation Errors when relationships receive incorrect types. Fixes #590. 
rest_framework/relations.py