Is it possible to perform Includes with flask?

后端 未结 2 637
深忆病人
深忆病人 2020-12-10 10:26

Say I have a template layout saved in template.html. This template includes a banner, side navigation, content container, and footer. Can I use flask to break up these page

相关标签:
2条回答
  • 2020-12-10 10:38

    By default, Flask uses Jinja2 as its template engine. See Jinja's Template Designer Documentation how it's done.

    0 讨论(0)
  • 2020-12-10 10:58

    From: http://jinja.pocoo.org/docs/templates/#include

    template.html

    {% include 'banner.html' %}
    {% include 'sidenavigation.html' %}
    {% include 'content.html' %}
    {% include 'footer.html' %}
    
    0 讨论(0)
提交回复
热议问题