Re: Mysterious transactions wrapping views without middleware.

2010-01-11 Thread apramanik
Sure, but the transaction is still open and PostgresSQL prevents any other statements form being executed until it is closed. So, the db is pretty much locked until the next transaction is started (which in my case is when i render the view). I filed a bug for it: http://code.djangoproject.com/tic

Re: Mysterious transactions wrapping views without middleware.

2010-01-11 Thread Tomasz Zieliński
On 10 Sty, 02:38, apramanik wrote: > Thanks! That partially fixes my problem. I wrapped a function with > commit_on_success and it doesn't rollback the changes if it throws an > IntegrityError coming from PostgresSQL: > > @transaction.commit_on_success >     def add_destination( self, placemark,

Re: Mysterious transactions wrapping views without middleware.

2010-01-09 Thread apramanik
Thanks! That partially fixes my problem. I wrapped a function with commit_on_success and it doesn't rollback the changes if it throws an IntegrityError coming from PostgresSQL: @transaction.commit_on_success def add_destination( self, placemark, trip, user, \ descript

Re: Mysterious transactions wrapping views without middleware.

2010-01-09 Thread Karen Tracey
On Sat, Jan 9, 2010 at 7:06 PM, apramanik wrote: > Hey all, > > I am seeing transactions wrapping my views without using the > 'django.middleware.transaction.TransactionMiddleware'. I don't have > any @transaction decorators around my view. I also tried setting > DISABLE_TRANSACTION_MANAGEMENT to

Mysterious transactions wrapping views without middleware.

2010-01-09 Thread apramanik
Hey all, I am seeing transactions wrapping my views without using the 'django.middleware.transaction.TransactionMiddleware'. I don't have any @transaction decorators around my view. I also tried setting DISABLE_TRANSACTION_MANAGEMENT to True as per: http://docs.djangoproject.com/en/1.1/topics/db/t