Changeset 5353
- Timestamp:
- 05/26/07 04:43:32 (1 year ago)
- Files:
-
- django/trunk/docs/templates.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/templates.txt
r5010 r5353 844 844 arguments in the URL. All arguments required by the URLconf should be present. 845 845 846 For example, suppose you have a view, ``app_name.client``, whose URLconf takes 847 a client ID. The URLconf line might look like this:: 848 849 ('^client/(\d+)/$', 'app_name.client') 846 For example, suppose you have a view, ``app_views.client``, whose URLconf 847 takes a client ID (here, ``client()`` is a method inside the views file 848 ``app_views.py``). The URLconf line might look like this:: 849 850 ('^client/(\d+)/$', 'app_views.client') 850 851 851 852 If this app's URLconf is included into the project's URLconf under a path … … 856 857 ...then, in a template, you can create a link to this view like this:: 857 858 858 {% url app_ name.client client.id %}859 {% url app_views.client client.id %} 859 860 860 861 The template tag will output the string ``/clients/client/123/``.
