repoze.tm
¶
-
repoze.tm.
default_commit_veto
(environ, status, headers)¶ When used as a commit veto, the logic in this function will cause the transaction to be committed if:
- An
X-Tm
header with the valuecommit
exists.
If an
X-Tm
header with the valuecommit
does not exist, the transaction will be aborted, if:- An
X-Tm
header with the valueabort
(or any value other thancommit
) exists. - An
X-Tm-Abort
header exists with any value (for backwards compatibility; preferX-Tm=abort
in new code). - The status code starts with
4
or5
.
Otherwise the transaction will be committed by default.
- An
-
class
repoze.tm.
TM
(application, commit_veto=None)¶ Transaction management WSGI middleware
-
class
repoze.tm.
AfterEnd
¶ Callback registry API helper class. Use the singleton instance
repoze.tm.after_end
when possible.
-
repoze.tm.
after_end
¶