#NEWLINE# def __set__( self , instance , value ) : #NEWLINE# #INDENT# if ( instance is None ) : #NEWLINE# #INDENT# raise AttributeError ( ( '%s must be accessed via instance' % self . field . name ) ) #NEWLINE# #UNINDENT# setattr ( instance , self . cache_name , value ) #NEWLINE# if ( ( value is not None ) and ( not self . field . rel . multiple ) ) : #NEWLINE# #INDENT# setattr ( value , self . field . related . get_cache_name ( ) , instance )