Support Django 1.6 transactions API

Use transaction.atomic instead of transaction.commit_on_success with Django >= 1.6 (avoiding TransactionManagementError)