एक database transaction ले गरी बहु-चलनहरू समूहबद्ध गर्छ ताकि तिनीहरू सबै सफल हुन् वा सबै एकसाथ असफल हुन् (atomicity) — आंशिक, असंगत अद्यावधिकहरू रोक्ने। Django ले transaction.atomic प्रदान गर्छ अपरेशनहरूलाई transaction मा बेर्न, बहु-चरण अपरेशनहरूको लागि डेटा integrity सुनिश्चित गर्दै।
समस्या जुन transactions समाधान गर्छ
():
from_account.balance -= amount
from_account.save()
to_account.balance += amount
to_account.save()
