#NEWLINE# def get_for_user( self , user , email ) : #NEWLINE# #INDENT# cache_key = '_emailaddress_cache' #NEWLINE# addresses = getattr ( user , cache_key , None ) #NEWLINE# if ( addresses is None ) : #NEWLINE# #INDENT# ret = self . get ( user = user , email__iexact = email ) #NEWLINE# ret . user = user #NEWLINE# return ret #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for address in addresses : #NEWLINE# #INDENT# if ( address . email . lower ( ) == email . lower ( ) ) : #NEWLINE# #INDENT# return address #NEWLINE# #UNINDENT# #UNINDENT# raise self . model . DoesNotExist ( )