[Django]-How can I prevent circular {% include %} calls in Jinja2 templates

3👍

To parse templates and check includes, i use this code:

    ast = env.parse(template_text)
    for each in meta.find_referenced_templates(ast) :        # find the (% includes %}

Leave a comment