#NEWLINE# def get_change_summary( model1 , model2 ) : #NEWLINE# #INDENT# '\n    Generate a summary of the changes between two address models\n    ' #NEWLINE# changes = get_changes_between_models ( model1 , model2 , [ 'search_text' ] ) #NEWLINE# change_descriptions = [ ] #NEWLINE# for ( field , delta ) in changes . items ( ) : #NEWLINE# #INDENT# change_descriptions . append ( ( _ ( "%(field)s changed from '%(old_value)s' to '%(new_value)s'" ) % { #NEWLINE# #INDENT# 'field' : field , #NEWLINE# 'old_value' : delta [ 0 ] , #NEWLINE# 'new_value' : delta [ 1 ] , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# #UNINDENT# return '\n' . join ( change_descriptions )