Dear Pocoo team,
I would like to get a list of all parent template paths for a template loaded from a file system that includes parent (inherited) templates. I am using the standard approach described in the documentation by preparing loaders and an environment to generate a template object, which I then use to render the final string. The source includes a "find_referenced_templates" in the Meta submodule to do exactly what I'm seeking from an AST, but I could not find a way to generate an AST from an environment.Template object.
How would I go about getting a list of parent templates for a loaded template from the environment?
As a feature request, I suggest adding a 'parent_filenames' attribute to the environment.Template object to get a list of all parent template filenames. This would be a useful complementary to the 'filename' attribute of the template object. Alternative (or additionally), a 'get_ast' method in the environment.Template object would be helpful as well.
Thank you,
Justin