#26835: Django's URL Regex Should Match Less
--------------------------------------+--------------------
     Reporter:  davidhalter           |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Core (URLs)           |    Version:  1.9
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 A lot of Django users URLs look like this:

 {{{
 r'^$'
 r'^users$'
 }}}

 I think it is annoying for a lot of users to need to write `^` and `$`. In
 my opinion, users should always have to match the full URL. With `.*`
 anyone could easily match the old behavior.

 I have often come across URLs where the `^` and `$` tags have been
 forgotten and therefore pretty much any URL would have matched.

 This is obviously something that breaks backwards compatibility, so we
 would have to think about possibly deprecating the old behavior.

 `django.conf.urls.include()` would obviously not need to match everything.

 I'd be glad to help out with the implementation.

--
Ticket URL: <https://code.djangoproject.com/ticket/26835>
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/054.4fd209788c5eb9748456177c8473e183%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to