Opened 18 years ago

Closed 18 years ago

Last modified 18 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: dev
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

Description

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

[snip]
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 by Russell Keith-Magee, 18 years ago

Resolution: fixed
Status: newclosed

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

comment:2 by wam-djangobug@…, 18 years ago

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

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