You could also try metaprogramming (probably the most Pythonic solution):
def make_saver(form):
@expose()
@validate(form=form)
def save():
...
return save
class MyController(Controller):
saveThisTypeOfElement = make_saver(ThisTypeForm)
saveThatTypeOfElement = make_saver(ThatTypeForm)
...
Cheers,
Simon
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---