If I return a Jinja2 template like so:
return render_response('home.htm', **context)
How do then get a list of the variables in context from within the template?
If I return a Jinja2 template like so:
return render_response('home.htm', **context)
How do then get a list of the variables in context from within the template?
I found @Garrett's answer to be a bit more complex than what I wanted. I found that I can easily inspect the context by adding a clone of the context to the context itself:
contextCopy = dict(context)
context['all'] = contextCopy
And then pretty printing that into my Jinja template with <pre>{{ all|pprint }}</pre>.