diff options
| author | Ad Timmering <awtimmering@gmail.com> | 2021-11-26 10:44:54 +0900 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-01-07 12:25:06 +0100 |
| commit | bdf3e156b4b47d45b8e37823164b598afc533ce0 (patch) | |
| tree | e27b8a05d1fe76478e06e5114a4f4aa86a5942ab /docs | |
| parent | fe76944269c13d59f8bb3bc1cfff7ab6443777e4 (diff) | |
Fixed #28628 -- Changed \d to [0-9] in regexes where appropriate.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/http/urls.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index d5d732e660..ab612547b0 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -246,8 +246,8 @@ following URL patterns which optionally take a page argument:: from django.urls import re_path urlpatterns = [ - re_path(r'^blog/(page-(\d+)/)?$', blog_articles), # bad - re_path(r'^comments/(?:page-(?P<page_number>\d+)/)?$', comments), # good + re_path(r'^blog/(page-([0-9]+)/)?$', blog_articles), # bad + re_path(r'^comments/(?:page-(?P<page_number>[0-9]+)/)?$', comments), # good ] Both patterns use nested arguments and will resolve: for example, |
