[Django] #24695: URL regex has unnecessary _

2 views
Skip to first unread message

Django

unread,
Apr 23, 2015, 11:35:49 PM4/23/15
to django-...@googlegroups.com
#24695: URL regex has unnecessary _
-------------------------------+--------------------
Reporter: datakid | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
On this page:

https://docs.djangoproject.com/en/1.8/ref/class-based-views/generic-
display/

Under myapps/urls.py in the DetailView

...

{{{

urlpatterns = [
url(r'^(?P<slug>[-_\w]+)/$', ArticleDetailView.as_view(), name
='article-detail'),
]
}}}

The _ is unnecessary, as it's already in \w

The regex should read

{{{

?P<slug>[-\w]+
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24695>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 24, 2015, 6:18:45 AM4/24/15
to django-...@googlegroups.com
#24695: URL regex has unnecessary _
-------------------------------+------------------------------------

Reporter: datakid | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by alasdairnicol):

* needs_docs: => 0
* has_patch: 0 => 1
* needs_better_patch: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

Pull request https://github.com/django/django/pull/4551

--
Ticket URL: <https://code.djangoproject.com/ticket/24695#comment:1>

Django

unread,
Apr 24, 2015, 9:24:04 AM4/24/15
to django-...@googlegroups.com
#24695: URL regex has unnecessary _
-------------------------------+------------------------------------
Reporter: datakid | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"b9e972b96171236c40a8a922c62d36b49854ee52" b9e972b]:
{{{
#!CommitTicketReference repository=""
revision="b9e972b96171236c40a8a922c62d36b49854ee52"
Fixed #24695 -- Tidied up a couple of regexes in the CBV docs

Thanks datakid for the report
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24695#comment:2>

Django

unread,
Apr 24, 2015, 9:24:30 AM4/24/15
to django-...@googlegroups.com
#24695: URL regex has unnecessary _
-------------------------------+------------------------------------
Reporter: datakid | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.8

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"415a65fc0ce2bef0dc0f5fa9867005be1baf7961" 415a65fc]:
{{{
#!CommitTicketReference repository=""
revision="415a65fc0ce2bef0dc0f5fa9867005be1baf7961"
[1.8.x] Fixed #24695 -- Tidied up a couple of regexes in the CBV docs

Thanks datakid for the report

Backport of b9e972b96171236c40a8a922c62d36b49854ee52 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24695#comment:3>

Reply all
Reply to author
Forward
0 new messages