标签: python django
我需要实现这样的东西:
{% include "pay_forms/{{ pay_gw.name }}.html" %},其中{{ pay_gw.name }}是标记。 我怎么能意识到这一点?
{% include "pay_forms/{{ pay_gw.name }}.html" %}
{{ pay_gw.name }}
答案 0 :(得分:5)
"pay_forms/"|add:pay_gw.name|add:".html"
(how to concat strings in Django templates)