#NEWLINE# def _foreign_key_ignoring_handle( self , * fixture_labels , **options ) : #NEWLINE# #INDENT# 'Wrap the the stock loaddata to ignore foreign key checks.\n\n    This allows loading circular references from fixtures, and is\n    monkeypatched into place in setup_databases().\n    ' #NEWLINE# using = options . get ( 'database' , DEFAULT_DB_ALIAS ) #NEWLINE# commit = options . get ( 'commit' , True ) #NEWLINE# connection = connections [ using ] #NEWLINE# if uses_mysql ( connection ) : #NEWLINE# #INDENT# cursor = connection . cursor ( ) #NEWLINE# cursor . execute ( 'SET foreign_key_checks = 0' ) #NEWLINE# #UNINDENT# _old_handle ( self , * fixture_labels , ** options ) #NEWLINE# if uses_mysql ( connection ) : #NEWLINE# #INDENT# cursor = connection . cursor ( ) #NEWLINE# cursor . execute ( 'SET foreign_key_checks = 1' ) #NEWLINE# if commit : #NEWLINE# #INDENT# connection . close ( )