I would like to group my templates into categories and then just add 1 template instead of several. In simple words, when I import a template, I would like its import also to be imported.
Suppose I have a template a.jinja:
{% import 'b.jinja' as b %}
{% import 'c.jinja' as c %}
Both the template b.jinjaand c.jinjalook like a simple macro:
{% macro macroB() -%}
macroB
{%- endmacro %}
I also have a template test.jinjaimported above:
{% import 'a.jinja' as a %}
{{ a.b.macroB() }} {
Is it possible to do this {{ a.b.macroB() }}?
source
share