mirror of
https://github.com/django/django.git
synced 2025-11-01 20:31:40 +00:00
Fixed incorrect regex in re_path() example.
This commit is contained in:
parent
56a302f338
commit
6e52e2554d
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue