> On 14 Oct 2014, at 04:25, Tres Seaver <[email protected]> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 10/13/2014 09:54 PM, Chris Rossi wrote: >> My naive first take is just write a utility method: >> >> def find_sitemanager(context): """ Find nearest site manager, walking >> back up the tree from 'context'. """ >> >> Then, don't use the global API, but call getUtility and queryUtility >> on the local registry that you find with your utility method. > > (Totally untested) You could subscribe to the IContextFound event, and > set the sitemanager based on context from within it: the global APIs > would "Just Work" at that point.
I bet you can also (and perhaps must?) update request.registry to the closest found registry at that point. Wichert. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
