changed transaction management to django 1.6 style