Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

with transaction.atomic():

from django.db import transaction

@transaction.atomic
def viewfunc(request):
    # This code executes inside a transaction.
    do_stuff()
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
8+3 =