#NEWLINE# def make_absolute_url( self , url ) : #NEWLINE# #INDENT# 'Given a URL this makes it absolute if this is possible.' #NEWLINE# base_url = self . db . config [ 'PROJECT' ] . get ( 'url' ) #NEWLINE# if ( self is None ) : #NEWLINE# #INDENT# raise RuntimeError ( 'To use absolute URLs you need to configure the URL in the project config.' ) #NEWLINE# #UNINDENT# return url_join ( ( base_url . rstrip ( '/' ) + '/' ) , url . lstrip ( '/' ) )