【问题标题】:Import Mako template in Django Template file在 Django 模板文件中导入 Mako 模板
【发布时间】:2016-08-02 22:07:06
【问题描述】:

我有base.html,它是用Django Template Engine 编写的,我想导入一个mako 文件footer.html

django可以导入mako模板吗? 我怎样才能导入它?

【问题讨论】:

  • 为什么要投反对票?你想解释一下吗?没有评论,没有解决方案的参考,太苛刻了。

标签: django templates mako


【解决方案1】:

这个怎么样?

<!-- base.html --!>

...

<body>

{% include 'footer.html' %}

</body>
<!-- footer --!>

{% extends 'base.html' %}

...

【讨论】:

    猜你喜欢
    • 2014-01-14
    • 2019-12-13
    • 2011-04-16
    • 1970-01-01
    • 2012-09-14
    • 2011-07-17
    • 2011-04-01
    • 2012-09-22
    • 2011-12-27
    相关资源
    最近更新 更多