def _get_cols_m2m(cls, k, child, fk_left_col_name, fk_right_col_name, fk_left_deferrable, fk_left_initially, fk_right_deferrable, fk_right_initially, fk_left_ondelete, fk_left_onupdate, fk_right_ondelete, fk_right_onupdate):
 (col_info, left_col) = _get_col_o2m(cls, fk_left_col_name, ondelete=fk_left_ondelete, onupdate=fk_left_onupdate, deferrable=fk_left_deferrable, initially=fk_left_initially)
 right_col = _get_col_o2o(cls, k, child, fk_right_col_name, ondelete=fk_right_ondelete, onupdate=fk_right_onupdate, deferrable=fk_right_deferrable, initially=fk_right_initially)
 left_col.primary_key = right_col.primary_key = True
 return (left_col, right_col)

def _get_cols_m2m ( cls , k , child , fk_left_col_name , fk_right_col_name , fk_left_deferrable , fk_left_initially , fk_right_deferrable , fk_right_initially , fk_left_ondelete , fk_left_onupdate , fk_right_ondelete , fk_right_onupdate ) : ( col_info , left_col ) = _get_col_o2m ( cls , fk_left_col_name , ondelete = fk_left_ondelete , onupdate = fk_left_onupdate , deferrable = fk_left_deferrable , initially = fk_left_initially ) right_col = _get_col_o2o ( cls , k , child , fk_right_col_name , ondelete = fk_right_ondelete , onupdate = fk_right_onupdate , deferrable = fk_right_deferrable , initially = fk_right_initially ) left_col . primary_key = right_col . primary_key = True return ( left_col , right_col )
gets the parent and child classes and returns foreign keys to both tables .