On Fri, Nov 14, 2008 at 5:29 PM, Alberto Valverde <[EMAIL PROTECTED]> wrote:
> The TG1 variable providers could be implemented I think with a list of > callables at app_globals and a wrapper around render() that updated the > extra_vars dict like it's done in TG1, something like: > > def render(template, extra_vars=None, ...): > if extra_vars is not None: > for f in g.variable_providers: > f(extra_vars) > return old_render(template, extra_vars, ...) I like this. It is the idea I was groping for earlier-on when suggesting usage of app_globals... Thanks Alberto! I feel this is the most TG1 like and at the same time the cleanest we could do. +1 for the render wrapper that searches for a callable list in the app_globals. Florent. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
