django templates: include and extends

后端 未结 7 2023
没有蜡笔的小新
没有蜡笔的小新 2020-12-07 10:37

I would like to provide the same content inside 2 different base files.

So I\'m trying to do this:

page1.html:

{% extends \"base1.html\" %}
         


        
7条回答
  •  广开言路
    2020-12-07 11:28

    Added for reference to future people who find this via google: You might want to look at the {% overextend %} tag provided by the mezzanine library for cases like this.

提交回复
热议问题