On Monday February 9, 2009 08:17:31 Michael Brickenstein wrote: > Hi! > > On 6 Feb., 21:04, Gustavo Narea <[email protected]> wrote: > > I know what it's for, I'm just a little concerned because that's not the > > standard way -- we'll end up with the standard way and the TurboGears > > way. But anyway it's not a big deal from my POV. > > I see that as problem, too. > > So, basically, it is all about, that we don't have > a standard way to access the environment. > > Why not provide every predicate with a member > "environment_fetcher" (possibly None): callable which returns the > active env. > If it is not None, automatic evaluation of predicates without passing > the environment is possible. > Else, raising an Exception, as the operation is unsupported, when no > environment_fetcher is supplied. > This is only reasonable: If there is no standard way to access the > environment, automatic evaluation cannot be supported. > > This could be done in repoze.what itself. > > What we need from tg is either > > - subclassing the predicates to provide the fetcher > or > - providing a factory, which constructs predicates with the appropiate > attribute. > > Comments? > Michael
Hello, Michael. repoze.what used to have a similar functionality when I just forked it from tg.ext.repoze.who. I had to remove it because not all the frameworks use something like Pylons' StackedObjectProxy. Passing the environ around is the safe bet. Cheers. -- Gustavo Narea <http://gustavonarea.net/>. Get rid of unethical constraints! Get freedomware: http://www.getgnulinux.org/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
