On 9/14/07, Ben Bangert <[EMAIL PROTECTED]> wrote: > > # in __init__ > > self.config = pylons.config._current_obj() > > The config is loaded into a process global during setup, this pulls > it back out and the Pylons app instance now has a reference to the > real config object.
It is funny to put the config into a Paste object just to pull it out again, but if it solves the problems we used to have with the config not being available sometimes, that's worth it. > > # in __call__ > > registry.register(pylons.config, self.config) > > Now it loads the config back into the global object proxy so that its > present during a request execution. Note that if you call down to > another Pylons based app, it will put its config in the global during > its call, then it will be cleaned up when the other app finishes. This could use more documentation on the wiki. I've had a vague idea of what StackedObjectProxy does, but the registry thing is mysterious. Especially since the word overlaps with several other kinds of registries (the Windows registry, etc.) -- Mike Orr <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
