def _url_val(val, obj, serializer, request, **kwargs):
 url = None
 if isinstance(val, Link):
  url = val.resolve_url(obj, request)
 elif isinstance(val, basestring):
  if getattr(serializer, 'field', None):
   serializer = serializer.parent
  url = (getattr(serializer, val)(obj) if (obj is not None) else None)
 else:
  url = val
 if ((not url) and (url != 0)):
  raise SkipField
 else:
  return url

def _url_val ( val , obj , serializer , request , ** kwargs ) : url = None if isinstance ( val , Link ) : url = val . resolve_url ( obj , request ) elif isinstance ( val , basestring ) : if getattr ( serializer , 'field' , None ) : serializer = serializer . parent url = ( getattr ( serializer , val ) ( obj ) if ( obj is not None ) else None ) else : url = val if ( ( not url ) and ( url != 0 ) ) : raise SkipField else : return url
function applied by hyperlinksfield to get the correct value in the schema .