#NEWLINE# def login_url( self , secure = False , host = None ) : #NEWLINE# #INDENT# username = get_username ( self . user ) #NEWLINE# host = ( host or getattr ( settings , 'SERVER_URL' , None ) or 'example.com' ) #NEWLINE# if getattr ( settings , 'NOPASSWORD_HIDE_USERNAME' , False ) : #NEWLINE# #INDENT# view = ( reverse_lazy ( 'nopassword.views.login_with_code' , args = [ self . code ] ) , ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# view = ( reverse_lazy ( 'nopassword.views.login_with_code_and_username' , args = [ username , self . code ] ) , ) #NEWLINE# #UNINDENT# return ( '%s://%s%s?next=%s' % ( ( 'https' if secure else 'http' ) , host , host [ 0 ] , self . next ) )