How to get a list of current variables from Jinja 2 template?
Technically, because context is not passed as a named dictionary, a little work is required to generate a list of the context variables from inside a template. It is possible though. Define a Jinja context function to return the jinja2.Context object, which is essentially a dictionary of the global variables/functions Make that function available in … Read more