Start here. This is the direct spoken answer to practice first.
Overview
Defines Django transaction nesting, exception boundaries, and post-commit work without promising durability.
The outermost transaction.atomic() block opens a transaction, and nested atomic blocks normally create savepoints. Leaving a block successfully commits its transaction or releases its savepoint; an exception rolls back to the matching boundary. I catch expected database exceptions outside the atomic block that should roll back, not inside a broken transaction. This keeps Django aware of whether later queries are valid.