Is there a way to flatten inherited jinja template?

401 Views Asked by At

I have jinja templates that inherits from a base template. Just straightforward extend.

For example, in setting.html:

{% extends "templates/base.html" %}

But this trips up polymer's vulcanizer, which doesn't understand the inheritance. So, is there a way to "flatten" my setting.html first, i.e. pull in the base.html into setting.html, and without evaluating the variables?

I looked at jinja's template api, but it's not very clear what api might do this? The only one that looks close might be compile_templates()? But again it's not clear from the documentation what this is really doing.

compile_templates(target, extensions=None, filter_func=None, zip='deflated', log_function=None, ignore_errors=True, py_compile=False)
0

There are 0 best solutions below