Opened 4 years ago

Closed 4 years ago

Last modified 4 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 4 years ago by julien

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin
  • Type changed from Uncategorized to Bug

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 4 years ago by timo

  • Resolution set to fixed
  • Status changed from new to closed

In [16630]:

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

comment:3 Changed 4 years ago by timo

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