ஒரு database transaction பல செயல்பாடுகளை ஒன்றாக சேர்ப்பதால் அவை அனைத்தும் வெற்றிபெறுகின்றன அல்லது அனைத்தும் ஒன்றாக தோல்வியடைகின்றன (atomicity) — பகுதியான, முரண்பட்ட updates தடுக்கின்றன. Django பல-படி செயல்பாடுகளுக்கான data integrity உறுதிசெய்ய, ஒரு transaction இல் செயல்பாடுகளை மடிக்க transaction.atomic வழங்குகிறது.
Transactions தீர்க்கும் சிக்கல்
():
from_account.balance -= amount
from_account.save()
to_account.balance += amount
to_account.save()
