Thanks Alberto and Michele that's exactly what I need!

By the way, I found some other uses to the expose decorating I tried.
Just for the record, the example I posted had a problem, adapt_call
wouldn't remove keywords like tg_random and for example the validation
decorator would get unexpected data. A fixed version is:

from turbogears.decorator import decorator

def expose(show_menu=True, *deco_args, **deco_kw):
    def entangle(func):
        def decorated(func, *args, **kw):
            output = func(*args, **kw)
            if isinstance(output, dict):
                output['show_menu'] = show_menu
            return output
        decorated = decorator(decorated)(func)
        decorated = turbogears.expose(*deco_args, **deco_kw)(decorated)
        return decorated
    return entangle

Thanks for the help!
Claudio


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to