def request_path(request):
 url = request.get_full_url()
 parts = urlparse.urlsplit(url)
 path = escape_path(parts.path)
 if (not path.startswith('/')):
  path = ('/' + path)
 return path

def request_path ( request ) : url = request . get_full_url ( ) parts = urlparse . urlsplit ( url ) path = escape_path ( parts . path ) if ( not path . startswith ( '/' ) ) : path = ( '/' + path ) return path
return path component of request-uri .