1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #27648 -- Deprecated (iLmsu) regex groups in url() patterns.

This commit is contained in:
Tim Graham
2016-12-27 15:59:13 -05:00
committed by GitHub
parent 544b2ef29f
commit 51cde873d9
7 changed files with 60 additions and 9 deletions

View File

@@ -747,3 +747,10 @@ Miscellaneous
* ``Model._meta.has_auto_field`` is deprecated in favor of checking if
``Model._meta.auto_field is not None``.
* Using regular expression groups with ``iLmsu#`` in ``url()`` is deprecated.
The only group that's useful is ``(?i)`` for case-insensitive URLs, however,
case-insensitive URLs aren't a good practice because they create multiple
entries for search engines, for example. An alternative solution could be to
create a :data:`~django.conf.urls.handler404` that looks for uppercase
characters in the URL and redirects to a lowercase equivalent.