Opened 8 years ago
Last modified 11 months ago
#27620 new New feature
Add a TransactionMiddleware
Reported by: | Tim Graham | Owned by: | |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Florian Apolloner, Ülgen Sarıkavak | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | How to create a pull request | ||
Description ¶
With new-style middleware, it should be feasible to write a TransactionMiddleware
that works properly (as opposed to the version in Django 1.7 and older).
According to the ticket's flags, the next step(s) to move this issue forward are:
- To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (7)
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 years ago
comment:3 by , 8 years ago
Cc: | added |
---|
Florian (apollo13) mentioned this idea in #django-dev IRC but later indicated there may be some problems with it.
follow-up: 5 comment:4 by , 8 years ago
@luojiebin That is to be decided, the main issue here - as you noted - is supporting non_atomic_requests. Any ideas welcome :D
comment:5 by , 8 years ago
But why the previous TransactionMiddleware was deprecated? Only because ATOMIC_REQUESTS can do the same thing as it? But it can not noly apply to views, but also other middleware, which ATOMIC_REQUESTS can't do. So, does the previous TransactionMiddleware cause any problem so that we have to deprecate it? With the new-style middleware, we can handle the previous problem, or we can add new feature to TransactionMiddlware with it?
@luojiebin That is to be decided, the main issue here - as you noted - is supporting non_atomic_requests. Any ideas welcome :D
comment:6 by , 3 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:7 by , 11 months ago
Cc: | added |
---|
Do this middleware want to do the same thing as the one in Django 1.7 except that it applies only to view functions, not including those middleware modules coming after it? Can you explain it in more detail? Thanks.