added commit-on-success transaction manager
authorgfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Thu, 20 Nov 2008 04:49:38 +0000 (04:49 +0000)
committergfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Thu, 20 Nov 2008 04:49:38 +0000 (04:49 +0000)
This is a smart default: each HTTP request is handled within a
discrete database transaction. If an unhandled exception occurs during
the request, the transaction is rolled back.

Maybe we'll want to rethink this later, and use a more fine-grained
approach.

git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@36 6d9bc8c9-1ec2-4278-b937-99fde70a366f

conifer/settings.py

index 76461a1..415cc47 100644 (file)
@@ -70,6 +70,8 @@ MIDDLEWARE_CLASSES = (
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'conifer.middleware.genshi_locals.ThreadLocals',
+    # TransactionMiddleware should be last...
+    'django.middleware.transaction.TransactionMiddleware',
 )
 
 ROOT_URLCONF = 'conifer.urls'