Ticket #7714: 7714.url_tag_doc.diff

File 7714.url_tag_doc.diff, 829 bytes (added by Julien Phalip, 16 years ago)

Revised Viktor's patch, adding 'project_name' to the paths

  • django/docs/templates.txt

     
    11681168takes a client ID (here, ``client()`` is a method inside the views file
    11691169``app_views.py``). The URLconf line might look like this::
    11701170
    1171     ('^client/(\d+)/$', 'app_views.client')
     1171    ('^client/(\d+)/$', 'project_name.app_name.app_views.client')
    11721172
    11731173If this app's URLconf is included into the project's URLconf under a path
    11741174such as this::
     
    11771177
    11781178...then, in a template, you can create a link to this view like this::
    11791179
    1180     {% url app_views.client client.id %}
     1180    {% url project_name.app_name.app_views.client client.id %}
    11811181
    11821182The template tag will output the string ``/clients/client/123/``.
    11831183
Back to Top