Opened 9 years ago

Last modified 8 years ago

#26043 closed New feature

Missing Middlewares for Changing Transaction Parameters — at Version 1

Reported by: Sven R. Kunze Owned by: nobody
Component: HTTP handling Version: 1.8
Severity: Normal Keywords:
Cc: Florian Apolloner, tzanke@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Sven R. Kunze)

We are upgrading from Django 1.7 to Django 1.8. We noticed, we cannot perform things like:

connection.cursor().execute('SET LOCAL my_variable TO %d' % var)

in some of our Middlewares anymore due to the missing TransactionMiddleware.

We have more than 2,000 views (some of them created dynamically) , so decorating them manually is not a practical nor secure solution.

Currently, we patch BaseHandler.make_view_atomic to handle this but its weird that there is no default way to insert custom code in between starting a transaction and the actual execution of a view.

Change History (1)

comment:1 by Sven R. Kunze, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top