In my Django template I need to assign the value of a names url into a variable within a with block so I can use it in multiple places.
I need to achieve something like
Why create a new template tag/filter if the feature is in core?
Look the samples at: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#url
{% url 'path.to.view' arg arg2 as the_url %}
I'm linking to {{ the_url }}
and
{% url 'path.to.view' as the_url %}
{% if the_url %}
Link to optional stuff
{% endif %}