UrlTag

The url tag {% url %} returns an absolute path reference thereby matching a view function and (space separated) optional parameters. That first argument must be a URL name, dotted path to a view name, or a context variable that evaluates as such. The template library future provides the newest implementation of the url tag.

{% load url from future %}

{% url 'sample' %}


Tags: tag templatetag templating

Edit this page
Wiki-logo