On Wednesday 02 July 2008 13:12:08 mettwoch wrote: > Hi, > > I only partially agree because one same controller has to supply the > dictionary with all the data for all the widgets on that single page. > I believe that it's not the right way to write reusable code. A > controller method should be specialized for one purpose and should be > reusable along with it's (partial) template to display on a "composed" > page.
A controller method is responsible for serving one page. That's the design TG uses, and there isn't much you can do about that. You are of course free to call other controller methods inside your controller to get a dict with prepared values, or use support methods/functions to do so. And you might even be able to delegate that to the template, using the template to pull data instead of pushing it through the returned controller method dict. Diez --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

