Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2964 closed defect (fixed)

[PATCH] typo in docstring for django.views.generic.simple.redirect_to()

Reported by: wam-djangobug@… Owned by: Jacob
Component: Generic views Version: master
Severity: trivial Keywords: typo
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The docstring for django.views.generic.simple.redirect_to states:

you could use the following URLconf::

        urlpatterns = patterns('',
            ('^foo/(?p<id>\d+)/$', 'django.views.generic.simple.redirect_to', {'url' : '/bar/%(id)s/'}),

In this example though, the regex is incorrect since the real syntax for a named pattern uses a capital 'P'. It should read:

            ('^foo/(?P<id>\d+)/$', 'django.views.generic.simple.redirect_to', {'url' : '/bar/%(id)s/'}),

It's a pretty trivial bug, but one with one character fix so figure I'd report it.

Change History (2)

comment:1 Changed 13 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [3946]) Fixes #2964 -- Fixed typo in regex in docstring for redirect_to. Thanks, wam-djangobug@….

comment:2 Changed 13 years ago by wam-djangobug@…

Looks like the bug was fixed in [3948], not [3946].

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