from django.db import connection
with transaction.atomic():
    cursor = connection.cursor()
cursor.execute('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ')
In Django, how to achieve repeatable reads for a transaction?