【发布时间】:2015-06-21 09:52:42
【问题描述】:
我在模板文件中有一个“创建新对象”按钮。
我想在我的网站的几个位置包含按钮,但我想包含带有链接的模板。
我试过了
{% include "snippets/icon_add.html" with link="/create_new_item/" only %}
但我想利用{% url 'create_new_item' %} 的好处。
我可以做类似的事情
{% include "snippets/icon_add.html" with link={% url 'create_new_item' %} only %}
【问题讨论】:
标签: python django django-templates django-template-filters