I have a "create new object" button in a template file. I want to include the button in several places at my website, but I want to include the template with a link. I've tried:
{% include "snippets/icon_add.html" with link="/create_new_item/" only %}
But I want to use the benefits of {% url 'create_new_item' %}
. Can I do something like:
{% include "snippets/icon_add.html" with link={% url 'create_new_item' %} only %}
{% url 'create_new_item' as the_url %}
does not thrown an error if the url doesn't exist. – Winograd