diff --git a/docs/ref/class-based-views/generic-display.txt b/docs/ref/class-based-views/generic-display.txt index 16975bdbea..8ebe871685 100644 --- a/docs/ref/class-based-views/generic-display.txt +++ b/docs/ref/class-based-views/generic-display.txt @@ -59,7 +59,7 @@ many projects they are typically the most commonly used views. from article.views import ArticleDetailView urlpatterns = [ - path('/', ArticleDetailView.as_view(), name='article-detail'), + path('/', ArticleDetailView.as_view(), name='article-detail'), ] **Example myapp/article_detail.html**: diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index 449f421775..92303a408a 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -80,7 +80,7 @@ Here's a sample URLconf:: path('articles/2003/', views.special_case_2003), path('articles//', views.year_archive), path('articles///', views.month_archive), - path('articles////', views.article_detail), + path('articles////', views.article_detail), ] Notes: @@ -200,7 +200,7 @@ Here's the example URLconf from earlier, rewritten using regular expressions:: path('articles/2003/', views.special_case_2003), re_path('articles/(?P[0-9]{4})/', views.year_archive), re_path('articles/(?P[0-9]{4})/(?P[0-9]{2})/', views.month_archive), - re_path('articles/(?P[0-9]{4})/(?P[0-9]{2})/(?P[^/]+)/', views.article_detail), + re_path('articles/(?P[0-9]{4})/(?P[0-9]{2})/(?P[\w-_]+)/', views.article_detail), ] This accomplishes roughly the same thing as the previous example, except: diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index dcecbf61a5..2bdf40fea1 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -1315,8 +1315,8 @@ Example URL patterns:: news_patterns = ([ path('', news_views.index, name='index'), - path('category//', news_views.category, name='category'), - path('/', news_views.details, name='detail'), + path('category//', news_views.category, name='category'), + path('/', news_views.details, name='detail'), ], 'news') urlpatterns += i18n_patterns( @@ -1385,8 +1385,8 @@ URL patterns can also be marked translatable using the news_patterns = ([ path('', news_views.index, name='index'), - path(_('category//'), news_views.category, name='category'), - path('/', news_views.details, name='detail'), + path(_('category//'), news_views.category, name='category'), + path('/', news_views.details, name='detail'), ], 'news') urlpatterns += i18n_patterns(