Re: "The outermost 'atomic' block cannot use savepoint = False when autocommit is off." error after upgrading to Django 1.8

2015-04-03 Thread Matt Woodward
Thanks so much for the quick and thorough reply! I think I'm set now with the "Right" example below -- I was getting errors (the most cryptic of which was just "__exit__") when I was trying various incarnations of atomic but it seems to be working now using the example you provided. The last t

Re: "The outermost 'atomic' block cannot use savepoint = False when autocommit is off." error after upgrading to Django 1.8

2015-04-02 Thread Simon Charette
Hi Matt, I think it would be preferable to use atomic() here. >From reading the documentation it looks like you might already be in a transaction when calling `set_autocommit` but it's hard to tell without the full traceback. Wha

"The outermost 'atomic' block cannot use savepoint = False when autocommit is off." error after upgrading to Django 1.8

2015-04-02 Thread Matt Woodward
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)