to handle transactions wrap each request in a transaction and set ATOMIC_REQUESTS to True in the configuration of each database for which you want to enable this behavior.
You may perform subtransactions using savepoints in your view code, typically with the atomic() context manager.