Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#16654 closed Bug (fixed)

Wrong example on "URL dispatcher" docu page

Reported by: jedie Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

On https://docs.djangoproject.com/en/1.3/topics/http/urls/#reverse is this IMHO wrong:

  • docs/topics/http/urls.txt

    diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt
    index d721012..429aa0b 100644
    a b namespaces into URLs on specific application instances, according to the 
    820820    The string returned by :meth:`~django.core.urlresolvers.reverse` is already
    821821    :ref:`urlquoted <uri-and-iri-handling>`. For example::
    822822
    823         >>> reverse('cities', args=u'Orléans')
     823        >>> reverse('cities', args=(u'Orléans',))
    824824        '.../Orl%C3%A9ans/'
    825825
    826826    Applying further encoding (such as :meth:`~django.utils.http.urlquote` or

Change History (3)

comment:1 Changed 5 years ago by Julien Phalip

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedReady for checkin
Type: UncategorizedBug

Minor suggestion: it could also be a list (instead of a tuple) to be consistent with the example above in the myview function.

comment:2 Changed 5 years ago by Tim Graham

Resolution: fixed
Status: newclosed

In [16630]:

Fixed #16654 - Syntax error in reverse() example; thanks jedie.

comment:3 Changed 5 years ago by Tim Graham

In [16631]:

[1.3.X] Fixed #16654 - Syntax error in reverse() example; thanks jedie.

Backport of r16630 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top