[storm] RFC: Storm with Pylons and Repoze.tm2

Olaf Conradi olaf at conradi.org
Mon Aug 4 09:35:18 BST 2008


Hi

2008/7/31 Olaf Conradi <olaf at conradi.org>:
> Hi all,
>
> I created a simple tutorial how to integrate repoze.tm2 with storm in pylons.
> You can read it at: https://storm.canonical.com/PylonsRepoze.tm2
>
> It does not require the StormMiddleware app anymore.
>
> It uses a transaction on every request. Repoze.tm2 will commit unless
> an exception is raised. This is independent of POST or GET requests.

I updated the example to configure a project to only commit a
transaction on POST request and abort on GET requests. Just like
James' Django middleware for Storm.

The policy is a hook and can be adjusted to include things like only
commit when a user is logged in (depending on your auth framework that
is). The policy can retrieve information from the environment, status
code or headers of the request to base its decision on.

Cheers,
 -Olaf



More information about the storm mailing list