On Mar 26, 2007, at 11:08 PM, Jesse James wrote:

>
> so, which part of that thread has the magic bullet?
> I just need to turn off TG-created transactions altogether since I
> always want explicit commit/rollback statements.
> Is this possible/easy?

This message contains the recipe: http://tinyurl.com/2vf44c

To turn off transactions for all methods you can write this function  
inside start-myapp.py

from dispatch import strategy
from tubogears.database import run_with_transaction

@run_with_transaction.when(strategy.default, order=-1)
def _no_transactions_please(func, *args, **kw):
        return func(*args, **kw)

Haven't tested it though... tell us how it goes...

HTH,
Alberto

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to