Custom Search

Wednesday, November 30, 2016

python django AttributeError: 'module' object has no attribute 'commit_on_success'

Error:
from django.db import connection, transaction
@transaction.commit_on_success
AttributeError: 'module' object has no attribute 'commit_on_success'

Fix:
@transaction.commit_on_success has been deprecated in Django 1.6, use
@transaction.atomic() decorator instead of @transaction.commit_on_success

No comments:

Post a Comment