Package posterity :: Package web :: Module middleware :: Class TransactionMiddleware

Class TransactionMiddleware



object --+
         |
        TransactionMiddleware

This wsgi-app wraps each request in a database transaction.

The transaction is rolled back if an exception is raised of if the HTTP status code is 5xx. Otherwise the transaction will be committed.



Instance Methods
 
__init__(self, app, dburi)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__call__(self, environ, start_response)

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self, app, dburi)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)