#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.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.b45eece2c7b6fd5a8d2da0e10b73bb06%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.