#26043: Missing Middlewares for Changing Transaction Parameters
-------------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by srkunze):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> We are upgrading from Django 1.7 to Django 1.8. We noticed, we cannot
> perform things:
> {{{
> 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 not default way to insert custom code in between
> starting a transaction and the actual execution of a view.
New description:
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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/26043#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.da60f64c5b18e5c2185fe84ef203a519%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.