      def from_native(self, value):
          # Convert URL -> model instance pk
          # TODO: Use values_list
          try:
              match = resolve(value)
          except:
              raise ValidationError('Invalid hyperlink - No URL match')
 
</s> remove             'blog_post_url': '/posts/1/'
 </s> add             'blog_post_url': 'http://testserver/posts/1/' </s> remove from django.core.urlresolvers import resolve
 </s> add from django.core.urlresolvers import resolve, get_script_prefix
        if value.startswith('http:') or value.startswith('https:'):
            # If needed convert absolute URLs to relative path
            value = urlparse(value).path
            prefix = get_script_prefix()
            if value.startswith(prefix):
                value = '/' + value[len(prefix):]

      def from_native(self, value):
          # Convert URL -> model instance pk
          # TODO: Use values_list
        if value.startswith('http:') or value.startswith('https:'):
            # If needed convert absolute URLs to relative path
            value = urlparse(value).path
            prefix = get_script_prefix()
            if value.startswith(prefix):
                value = '/' + value[len(prefix):]

          try:
              match = resolve(value)
          except:
              raise ValidationError('Invalid hyperlink - No URL match')
keep keep add keep keep keep keep
 Allow use of absolute URLs when deserializing hyperlinked fields 
rest_framework/fields.py