事务操作

from django.db import transaction
from django.db import models


try:
    with transaction.atomic():
        # 事务
        # 一系列的操作
        pass
    
except Exception as e:
    print(e)

  

相关文章:

  • 2021-10-19
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-11-23
  • 2021-09-14
  • 2022-01-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-15
  • 2021-08-25
  • 2021-11-30
  • 2022-02-26
相关资源
相似解决方案