summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-26 09:43:32 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-26 09:43:32 +0000
commitaae36cfc8e8ad50c6ee3001fbf4f87f5de3b9a46 (patch)
tree71847865d5570e316d8bc1a55af228e9eb745f1f
parentc1efc3cd9fdf4cfd3b7e5d50fd86a0419c21872e (diff)
Fixed #4355 -- Clarified a confusing example in the use of the url template
tag. Based on a patch from Collin Grady. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/templates.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/templates.txt b/docs/templates.txt
index 2f9f769b96..50f238bf5b 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -843,10 +843,11 @@ The first argument is a path to a view function in the format
should be comma-separated values that will be used as positional and keyword
arguments in the URL. All arguments required by the URLconf should be present.
-For example, suppose you have a view, ``app_name.client``, whose URLconf takes
-a client ID. The URLconf line might look like this::
+For example, suppose you have a view, ``app_views.client``, whose URLconf
+takes a client ID (here, ``client()`` is a method inside the views file
+``app_views.py``). The URLconf line might look like this::
- ('^client/(\d+)/$', 'app_name.client')
+ ('^client/(\d+)/$', 'app_views.client')
If this app's URLconf is included into the project's URLconf under a path
such as this::
@@ -855,7 +856,7 @@ such as this::
...then, in a template, you can create a link to this view like this::
- {% url app_name.client client.id %}
+ {% url app_views.client client.id %}
The template tag will output the string ``/clients/client/123/``.