Opened 9 years ago

Closed 9 years ago

Last modified 9 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: UI/UX:


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 9 years ago by russellm

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

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

comment:2 Changed 9 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