#NEWLINE# def prepare( self ) : #NEWLINE# #INDENT# if ( not self . current_user ) : #NEWLINE# #INDENT# url = __conf__ . login_url #NEWLINE# if ( '?' not in url ) : #NEWLINE# #INDENT# if urlparse . urlsplit ( self ) . scheme : #NEWLINE# #INDENT# next_url = self . request . full_url ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# next_url = self . request . uri #NEWLINE# #UNINDENT# url += ( '?' + urlencode ( dict ( next = next_url ) ) ) #NEWLINE# #UNINDENT# self . redirect ( url ) #NEWLINE# return