mirror of
https://github.com/django/django.git
synced 2024-12-24 01:55:49 +00:00
parent
2ba09c000d
commit
dfc092622e
@ -1003,9 +1003,15 @@ url
|
||||
^^^
|
||||
|
||||
Returns an absolute path reference (a URL without the domain name) matching a
|
||||
given view function and optional parameters. This is a way to output links
|
||||
without violating the DRY principle by having to hard-code URLs in your
|
||||
templates::
|
||||
given view function and optional parameters.
|
||||
|
||||
.. versionchanged:: 1.6
|
||||
|
||||
Any special characters in the resulting path will be encoded using
|
||||
:func:`~django.utils.encoding.iri_to_uri`.
|
||||
|
||||
This is a way to output links without violating the DRY principle by having to
|
||||
hard-code URLs in your templates::
|
||||
|
||||
{% url 'path.to.some_view' v1 v2 %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user