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-Tmheader with the valuecommitexists.
If an
X-Tmheader with the valuecommitdoes not exist, the transaction will be aborted, if:- An
X-Tmheader with the valueabort(or any value other thancommit) exists. - An
X-Tm-Abortheader exists with any value (for backwards compatibility; preferX-Tm=abortin new code). - The status code starts with
4or5.
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_endwhen possible.
-
repoze.tm.after_end¶