[Django]-How Django atomic requests works?

46👍

ATOMIC_REQUESTS is an an attribute of the database connection settings dict, not the top-level settings. So, for example:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'mydatabase',
        'USER': 'mydatabaseuser',
        'PASSWORD': 'mypassword',
        'HOST': '127.0.0.1',
        'PORT': '5432',
        'ATOMIC_REQUESTS': True,
    }
}

Leave a comment