Start here. This is the direct spoken answer to practice first.
Overview
Chooses atomic database expressions, row locks, and constraints from the invariant being protected.
An F() expression lets the database update from the current column value, such as incrementing a counter, without a Python read-modify-write race. select_for_update() locks selected rows until the surrounding transaction ends, so code can read several values, check a rule, and update under that lock. I use it inside transaction.atomic() on a database that supports the required locking behavior.