upg django 1.6. Fixed some transaction code.