#NEWLINE# def contribute_to_class( self , cls , name ) : #NEWLINE# #INDENT# if ( self . rel . symmetrical and ( ( self . rel . to == 'self' ) or ( self . rel . to == cls . _meta . object_name ) ) ) : #NEWLINE# #INDENT# self . rel . related_name = ( '%s_rel_+' % name ) #NEWLINE# #UNINDENT# super ( ManyToManyField , self ) . contribute_to_class ( cls , name ) #NEWLINE# if ( ( not self . rel . through ) and ( not cls . _meta . abstract ) and ( not cls . _meta . swapped ) ) : #NEWLINE# #INDENT# self . rel . through = create_many_to_many_intermediary_model ( self , cls ) #NEWLINE# #UNINDENT# setattr ( cls , self . name , ReverseManyRelatedObjectsDescriptor ( self ) ) #NEWLINE# self . m2m_db_table = curry ( self . _get_m2m_db_table , cls . _meta ) #NEWLINE# if isinstance ( self . rel . through , six . string_types ) : #NEWLINE# #INDENT# def resolve_through_model( field , model , cls ) : #NEWLINE# #INDENT# field . rel . through = model #NEWLINE# #UNINDENT# add_lazy_relation ( cls , self , self . rel . through , resolve_through_model )