Hi, Unable to perform rollback the transactions. Ended up with the following error "Transaction managed block ended with pending COMMIT/ROLLBACK"
Can I rollback the db changes even if the code doesn't raise any excceptions? Here is the code: from django.db import transaction @transaction.commit_manually def view(request): if request.method== "POST" : print "in post" new_user = User.objects.create_user(username="testing", email="l...@lokesh.com", password="lokesh") print "return value new user = %s" % new_user transaction.rollback() return render_to_response("templates/listuser.html", context_instance=RequestContext (request)) else: print "in else" return render_to_response("templates/listu.html", context_instance=RequestContext (request)) Thanks for your time. Regards, Lokesh --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---