Maybe "g" could keep the whole configuration image and allow modules to query it as they please. I would still somehow try to avoid any excessive parsing and validation of configuration options. A module could access configuration once, figure out parameters, put them back into "g" parsed and ready, and then use on subsequent requests.
Sergey. On 11/14/06, Robert <[EMAIL PROTECTED]> wrote: > > That's awkward when you have a lot of config data. You'd have to > manually copy it all somewhere (app_globals) into Globals, which is > essentially boilerplate code. The right thing to do would be, as OP > requested, to let every module access easily and consistently the part > of configuration this module cares about - no clutter and fat that way. > > Sergey Lipnevich napisaĆ(a): > > I think the "pattern" that's being encourages is to only access > > configuration once in app_globals.py, that's why Globals.__init__ gets > > a reference to it. Anything you need later must become Globals member > > variables accessible everywhere via "g" proxy. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
