Access to a template's context.lookup is great for debugging, and works perfectly when I use TemplateLookup and Template classes directly.
I've been trying to get this to work within Pyramid, which obviously calls TemplateLookup and Template on my behalf, but I'm missing something. When I access the
lookup property within the template code, I don't get the introspection object I think I want. I'd like to be able to
<% log.debug(context.lookup.get_template("this template right now").code) %> kind of thing.
If I pass in the name of the template, everything works fine, but I'd like to make this generic and just "aware".
Is there a way to get the name of the currently executing template?