#NEWLINE# def build_absolute_uri( request , relative_url ) : #NEWLINE# #INDENT# 'Ensure absolute_uri are relative to WEBROOT.' #NEWLINE# webroot = getattr ( settings , 'WEBROOT' , '' ) #NEWLINE# if ( webroot . endswith ( '/' ) and relative_url . startswith ( '/' ) ) : #NEWLINE# #INDENT# webroot = webroot [ : ( - 1 ) ] #NEWLINE# #UNINDENT# return request . build_absolute_uri ( ( webroot + relative_url ) )