Django: construct value of {% include %} tag dynamically?

后端 未结 3 1057
傲寒
傲寒 2021-02-18 13:37

I\'d like to use an {% include page.html %} tag in my Django template, and construct the value of page.html dynamically.

Is there any way to do

3条回答
  •  难免孤独
    2021-02-18 13:57

    You can concatenate plain strings and variables right in your templates using with tag and add filter, see this SO answer.

提交回复
热议问题