#1201: run_with_transaction to use MultiorderGenericFunction
------------------------+---------------------------------------------------
Reporter: Dennis | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: TurboGears | Version: 1.0b2
Severity: normal | Keywords:
------------------------+---------------------------------------------------
run_with_transaction is a generic function. It is difficult to customize
it though because the _use_sa() function will evaluate to true on at least
one of the pre-defined rules. (so_rwt and sa_rwt). In order to have your
own customized function run, you need to be able to specify a higher
priority with MultiorderGenericFunction.
Here is the patch:
Index: turbogears/database.py
===================================================================
--- turbogears/database.py (revision 2078)
+++ turbogears/database.py (working copy)
@@ -13,6 +13,7 @@
import turbogears
from turbogears import config, errorhandling
+from turbogears.genericfunctions import MultiorderGenericFunction
log = logging.getLogger("turbogears.database")
@@ -231,7 +232,7 @@
for hub in hub_registry:
hub.end()
-[dispatch.generic()]
+[dispatch.generic(MultiorderGenericFunction)]
def run_with_transaction(func, *args, **kw):
pass
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/1201>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" 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-tickets?hl=en
-~----------~----~----~----~------~----~------~--~---