#NEWLINE# def _create_fk_sql( self , model , field , suffix ) : #NEWLINE# #INDENT# from_table = model . _meta . db_table #NEWLINE# from_column = field . column #NEWLINE# to_table = field . target_field . model . _meta . db_table #NEWLINE# to_column = field . target_field . column #NEWLINE# suffix = ( suffix % { #NEWLINE# #INDENT# 'to_table' : to_table , #NEWLINE# 'to_column' : to_column , #NEWLINE# #UNINDENT# } ) #NEWLINE# return ( self . sql_create_fk % { #NEWLINE# #INDENT# 'table' : self . quote_name ( from_table ) , #NEWLINE# 'name' : self . quote_name ( self . _create_index_name ( to_column , [ from_column ] , suffix = suffix ) ) , #NEWLINE# 'column' : self . quote_name ( from_column ) , #NEWLINE# 'to_table' : self . quote_name ( to_table ) , #NEWLINE# 'to_column' : self . quote_name ( to_column ) , #NEWLINE# #UNINDENT# } )