Opened 8 years ago

Closed 8 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: UI/UX:





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 8 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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