Skip to content

Commit ecb56ce

Browse files
committed
Fixed #12946: Removed an invalid example of url tag usage from the docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12652 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 6d7754b commit ecb56ce

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/ref/templates/builtins.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,12 +891,18 @@ Returns an absolute URL (i.e., a URL without the domain name) matching a given
891891
view function and optional parameters. This is a way to output links without
892892
violating the DRY principle by having to hard-code URLs in your templates::
893893

894-
{% url path.to.some_view arg1,arg2,name1=value1 %}
894+
{% url path.to.some_view v1,v2 %}
895895

896896
The first argument is a path to a view function in the format
897897
``package.package.module.function``. Additional arguments are optional and
898-
should be comma-separated values that will be used as positional and keyword
899-
arguments in the URL. All arguments required by the URLconf should be present.
898+
should be comma-separated values that will be used as arguments in the URL.
899+
The example above shows passing positional arguments. Alternatively you may
900+
use keyword syntax::
901+
902+
{% url path.to.some_view arg1=v1,arg2=v2 %}
903+
904+
Do not mix both positional and keyword syntax in a single call. All arguments
905+
required by the URLconf should be present.
900906

901907
For example, suppose you have a view, ``app_views.client``, whose URLconf
902908
takes a client ID (here, ``client()`` is a method inside the views file

0 commit comments

Comments
 (0)