Opened 13 years ago

Closed 13 years ago

#4218 closed (invalid)

Transactions: Middleware hook at the top

Reported by: Thomas Güttler Owned by: Jacob
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no





The order is quite important. The transaction middleware applies not only to view functions, but also for all middleware modules that come after it.

I guess most people want that the sessions are part of the transaction. I think
'django.middleware.transaction.TransactionMiddleware' should be at the top of the list.

Change History (1)

comment:1 Changed 13 years ago by Jacob

Resolution: invalid
Status: newclosed

Actually, since sessions are "lazy" this order doesn't matter; as long as none of the middleware modules before the TransactionMiddleware}} actually access {{{request.session -- and none do -- it doesn't matter.

Note: See TracTickets for help on using tickets.
Back to Top