Hi all -- I just upgraded one of my projects to Django 1.8 from 1.7.7 and
in a view function where we're doing manual transaction management
(Postgres) I'm now getting the error in the subject line.
Basic gist of the code involved:
def foo(request):
try:
transaction.set_autocommit(False)
... do stuff involving multiple database actions ...
except (DatabaseError, Exception) as e:
transaction.rollback()
This worked fine in 1.7.7 so I'm not sure what I need to change to get it
working with 1.8.
I did read the docs on the atomic() functionality and took a few runs at
that but just wound up with different errors, so I thought I'd start with
what I originally had and see what I need to change to make Django 1.8
happy. But if using the atomic() stuff is preferable any tips around that
would also be appreciated; I can post the errors I'm getting when trying
things that way as needed.
Appreciate any ideas anyone has. Thanks.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/670a0358-3538-4a2f-b5e3-b1c2a33076ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.