I have recursive function and obj.save() is inside it. how to prevent the query from db at every iteration? is django transaction.atomic do that.