I posted this on stackoverflow 
<http://stackoverflow.com/questions/33377304/is-there-a-way-to-flatten-inherited-jinja-template>,
 
but it occurred to me to cross-post here as well.  Any help would be 
greatly appreciated as I'm a big fan of jinja.

Thanks!


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 
<http://jinja.pocoo.org/docs/dev/api/#high-level-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)

inheritance <http://stackoverflow.com/questions/tagged/inheritance> jinja2 
<http://stackoverflow.com/questions/tagged/jinja2> webapp2 
<http://stackoverflow.com/questions/tagged/webapp2> vulcanize 
<http://stackoverflow.com/questions/tagged/vulcanize>

-- 
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.

Reply via email to