#NEWLINE# def related_items_changed( self , instance , related_manager ) : #NEWLINE# #INDENT# '\n        Stores the keywords as a single string for searching.\n        ' #NEWLINE# assigned = related_manager . select_related ( 'keyword' ) #NEWLINE# keywords = ' ' . join ( [ str ( instance . keyword ) for a in assigned ] ) #NEWLINE# string_field_name = ( list ( self . fields . keys ( ) ) [ 0 ] % self . related_field_name ) #NEWLINE# if ( getattr ( instance , string_field_name ) != keywords ) : #NEWLINE# #INDENT# setattr ( instance , string_field_name , keywords ) #NEWLINE# instance . save ( )