def _foreign_key_ignoring_handle(self, *fixture_labels, **options):
 using = options.get('database', DEFAULT_DB_ALIAS)
 commit = options.get('commit', True)
 connection = connections[using]
 if uses_mysql(connection):
  cursor = connection.cursor()
  cursor.execute('SET foreign_key_checks = 0')
 _old_handle(self, *fixture_labels, **options)
 if uses_mysql(connection):
  cursor = connection.cursor()
  cursor.execute('SET foreign_key_checks = 1')

def _foreign_key_ignoring_handle ( self , * fixture_labels , ** options ) : using = options . get ( 'database' , DEFAULT_DB_ALIAS ) commit = options . get ( 'commit' , True ) connection = connections [ using ] if uses_mysql ( connection ) : cursor = connection . cursor ( ) cursor . execute ( 'SET foreign_key_checks = 0' ) _old_handle ( self , * fixture_labels , ** options ) if uses_mysql ( connection ) : cursor = connection . cursor ( ) cursor . execute ( 'SET foreign_key_checks = 1' )
wrap the the stock loaddata to ignore foreign key checks .