Hi,

I follow: http://docs.djangoproject.com/en/dev/topics/db/transactions/
{{{
The order is quite important. The transaction middleware applies not
only to view functions, but also for all middleware modules that come
after it. So if you use the session middleware after the transaction
middleware, session creation will be part of the transaction.
}}}

# settings.py
MIDDLEWARE_CLASSES = [
    
'djangotools.middleware.HandleExceptionMiddleware.HandleExceptionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.transaction.TransactionMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.doc.XViewMiddleware',
]

But the result is not what is excepted if there is an exception:
 1. All DB changes are rolled back by TransactionMiddleware 
(proccess_exception())
 2. Debug-Response is returned. All middleware methods are called:
   SessionMiddleware.process_response() --> commit_unless_managed() --> session 
gets
   saved to DB, since the connection is no longer managed.

Is this a bug or am I missing something?

I use django 1.0.2


  Thomas

-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to