#NEWLINE# def relative_url( self , other_url , to_application = False ) : #NEWLINE# #INDENT# '\n        Resolve other_url relative to the request URL.\n\n        If ``to_application`` is True, then resolve it relative to the\n        URL with only SCRIPT_NAME\n        ' #NEWLINE# if to_application : #NEWLINE# #INDENT# url = self . application_url #NEWLINE# if ( not url . endswith ( '/' ) ) : #NEWLINE# #INDENT# url += '/' #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# url = self . path_url #NEWLINE# #UNINDENT# return urlparse . urljoin ( url , other_url )