Ticket #12945: 12945.docfixes.diff

File 12945.docfixes.diff, 2.7 KB (added by Daniel F Moisset, 14 years ago)

Documentation fixes to acknowledge spaces the official separators in {% url %}

  • django/contrib/admin/templates/registration/password_reset_email.html

    diff --git a/django/contrib/admin/templates/registration/password_reset_email.html b/django/contrib/admin/templates/registration/password_reset_email.html
    a b  
    44
    55{% trans "Please go to the following page and choose a new password:" %}
    66{% block reset_link %}
    7 {{ protocol }}://{{ domain }}{% url django.contrib.auth.views.password_reset_confirm uidb36=uid, token=token %}
     7{{ protocol }}://{{ domain }}{% url django.contrib.auth.views.password_reset_confirm uidb36=uid token=token %}
    88{% endblock %}
    99{% trans "Your username, in case you've forgotten:" %} {{ user.username }}
    1010
  • django/template/defaulttags.py

    diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
    a b  
    10771077    This is a way to define links that aren't tied to a particular URL
    10781078    configuration::
    10791079
    1080         {% url path.to.some_view arg1,arg2,name1=value1 %}
     1080        {% url path.to.some_view arg1 arg2 name1=value1 %}
    10811081
    10821082    The first argument is a path to a view. It can be an absolute python path
    10831083    or just ``app_name.view_name`` without the project name if the view is
  • docs/ref/templates/builtins.txt

    diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
    a b  
    891891view function and optional parameters. This is a way to output links without
    892892violating the DRY principle by having to hard-code URLs in your templates::
    893893
    894     {% url path.to.some_view v1,v2 %}
     894    {% url path.to.some_view v1 v2 %}
    895895
    896896The first argument is a path to a view function in the format
    897897``package.package.module.function``. Additional arguments are optional and
     
    899899The example above shows passing positional arguments. Alternatively you may
    900900use keyword syntax::
    901901
    902     {% url path.to.some_view arg1=v1,arg2=v2 %}
     902    {% url path.to.some_view arg1=v1 arg2=v2 %}
    903903
    904904Do not mix both positional and keyword syntax in a single call. All arguments
    905905required by the URLconf should be present.
     
    941941different call::
    942942
    943943
    944     {% url path.to.view arg, arg2 as the_url %}
     944    {% url path.to.view arg arg2 as the_url %}
    945945
    946946    <a href="{{ the_url }}">I'm linking to {{ the_url }}</a>
    947947
     
    963963<topics-http-reversing-url-namespaces>`, including using any hints provided
    964964by the context as to the current application.
    965965
     966.. versionadded:: 1.2
     967
     968Note that the old syntax using commas as argument separators is still supported, but deprecated;
     969the officially sanctioned syntax uses spaces, for consistency with other built-in tags.
     970
    966971.. templatetag:: widthratio
    967972
    968973widthratio
Back to Top