Hi!  I was wondering if there was an easy way to access the variables
exported by a template.  I see exported_vars [1] in the documentation,
but I can't seem to figure out how to access the context of a loaded
template.  ronny on #pocoo suggested that I can mess with the AST/
parser, but I'm not exactly clear on where to start [2].

Some context: I have a script with template which I want to render
with some dynamic defaults and prompt the user to fill in the
undefined variables.  Right now I'm just searching the template text
for environment.variable_start/end_string, which breaks almost
immediately if a variable isn't used standalone, but instead as part
of a loop, for example.

I think I can workaround this by simply using the set tag and calling
a function to "do the right thing" independently, but I was hoping
there was some less arduous (or even just more elegant) option.

Thanks,
a.

[1] http://jinja.pocoo.org/2/documentation/api#jinja2.Context.exported_vars
[2] Starting at 2009-07-26T02:59:11 in 
http://dev.pocoo.org/irclogs/%23pocoo.2009-07-26.log

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" 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/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to