I'd like to see either the environment passed, or some form of
globally available api that lets anything within a thread obtain the
current environment or request being handled by that thread.

At the least, I'd love to see some documentation on what is guaranteed
to be available within template, and why those choices were made and
not others.

I recently created a patch for my local 0.11.1 trac installations to
enable all SQL queries to be logged.  It was trivial to add the
logging messages.  It was non-trivial to figure out how to get a
handle to the log (which involved passing the environment to the
database connection at the right time.)

Jerry

On Apr 29, 8:17 am, Erik Bray <[email protected]> wrote:
> On Wed, Apr 29, 2009 at 10:33 AM, Remy Blank <[email protected]> wrote:
> > Emmanuel Blot wrote:
> >> What's the best/easy way to obtain the name of the current environment
> >> from within a template file?
>
> > I have often wondered why env is not systematically passed as data to
> > all templates. Hopefully somebody will reply, so I'll know for sure ;-)
>
> > -- Remy
>
> My guess would be that it's just not actually needed in most
> templates.  I've never needed it.  Maybe the value of a few individual
> config options here and there, but never the entire Environment
> object.  OTOH I don't see how it could hurt.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" 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/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to