
Use partial() With Django’s transaction.on_commit() to Avoid Late-Binding Bugs
Aug. 26, 2022
|
Articles
Django’s
transaction.on_commit()
allows you to run a function after the current database transaction is committed. This is useful to ensure that actions with external services, like sending emails, don’t run until the relevant data is definitely saved. Adam Johnson covers four techniques for passing callables to on_commit()
.
Filed in:
Articles

Sponsor Number One
Subscribe to Django News
Weekly Django news, articles, projects, and more. Curated by Jeff Triplett & William Vincent.
No spam, ever. We'll never share your email address and you can opt out at any time.