Entendido.


On Mon, Mar 31, 2014 at 5:15 PM, Juan Funez <notifications@github.com>wrote:

> In scielomanager/scielomanager/settings.py:
>
> > @@ -128,6 +128,7 @@
> >      'maintenancewindow.middleware.MaintenanceMiddleware',
> >      'django.middleware.csrf.CsrfViewMiddleware',
> >      'waffle.middleware.WaffleMiddleware',
> > +    'django.middleware.transaction.TransactionMiddleware',
>
> Pelo que diz na documentação do django, é só ativar o middleware que
> funciona:
>
> Binds commit and rollback of the default database to the request/response phase. If a view function runs successfully, a commit is done. If it fails with an exception, a rollback is done.
>
>
> https://docs.djangoproject.com/en/1.4/ref/middleware/#django.middleware.transaction.TransactionMiddleware
>
> E também aqui:
>
> The recommended way to handle transactions in Web requests is to tie them to the request and response phases via Django's TransactionMiddleware.
>
> It works like this: When a request starts, Django starts a transaction. If the response is produced without problems, Django commits any pending transactions. If the view function produces an exception, Django rolls back any pending transactions.
>
> To activate this feature, just add the TransactionMiddleware middleware to your MIDDLEWARE_CLASSES setting:
>
>
> https://docs.djangoproject.com/en/1.4/topics/db/transactions/#tying-transactions-to-http-requests
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/scieloorg/scielo-manager/pull/715/files#r11134412>
> .
>



-- 
Atenciosamente,

Jamil Atta Junior