def resource_link():
 path = request.path.strip('/')
 if ('|item' in request.endpoint):
  path = path[:path.rfind('/')]
 def strip_prefix(hit):
  return (path[len(hit):] if path.startswith(hit) else path)
 if config.URL_PREFIX:
  path = strip_prefix((config.URL_PREFIX + '/'))
 if config.API_VERSION:
  path = strip_prefix((config.API_VERSION + '/'))
 return path

def resource_link ( ) : path = request . path . strip ( '/' ) if ( '|item' in request . endpoint ) : path = path [ : path . rfind ( '/' ) ] def strip_prefix ( hit ) : return ( path [ len ( hit ) : ] if path . startswith ( hit ) else path ) if config . URL_PREFIX : path = strip_prefix ( ( config . URL_PREFIX + '/' ) ) if config . API_VERSION : path = strip_prefix ( ( config . API_VERSION + '/' ) ) return path
returns the current resource path relative to the api entry point .