如何在Google App Engine中扩展父HTML页面

0 投票
1 回答
706 浏览
提问于 2025-04-16 00:45
templates
    | ....a.html
    |.....admin
            |..... index.html
            |..... b.html

在谷歌应用引擎的模板中,我可以在 index.html 中使用这个来扩展 b.html:

{% extends 'b.html' %}

但是我该如何在 index.html 中扩展 a.html 呢?

谢谢

1 个回答

1

每个模板只能有一个 extends。这就像在C#和Java这样的面向对象编程语言中只能有单一继承一样。

这个问题有一个答案,可以给你一些关于如何布局你的模板和设计良好的模板继承结构的好主意。

撰写回答