django orm 事務回滾

from django.db import IntegrityError, transaction @transaction.atomic def viewfunc(request): create_parent() try: with transaction.atomic(): generate_relationships()
相關文章
相關標籤/搜索