django include template from another app

后端 未结 2 834
情书的邮戳
情书的邮戳 2021-01-30 10:12

While setting up my project and working to keep apps non-dependent, I\'ve hit a snag. I\'d like all of the templates from the different apps to have a consistent header and foot

2条回答
  •  后悔当初
    2021-01-30 11:04

    While you can certainly do that by using the include tag and specifying absolute paths, the proper way to work in Django is by using Template inheritance.

提交回复
热议问题