diff options
| author | René Fleschenberg <rene@fleschenberg.net> | 2018-02-27 01:57:52 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-02-26 19:57:52 -0500 |
| commit | 6e52e2554dcc902b446f9d371ed1e6a07f36d6ec (patch) | |
| tree | 8e5e2039c58ee8f144128b6350634e5714296cd0 | |
| parent | 56a302f338761cdda3cc1116a89687051c7c005a (diff) | |
Fixed incorrect regex in re_path() example.
| -rw-r--r-- | docs/topics/http/urls.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index 5d28ac4272..ead494e619 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -201,7 +201,7 @@ Here's the example URLconf from earlier, rewritten using regular expressions:: path('articles/2003/', views.special_case_2003), re_path(r'^articles/(?P<year>[0-9]{4})/$', views.year_archive), re_path(r'^articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/$', views.month_archive), - re_path(r'^articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<slug>[\w-_]+)/$', views.article_detail), + re_path(r'^articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<slug>[\w-]+)/$', views.article_detail), ] This accomplishes roughly the same thing as the previous example, except: |
