summaryrefslogtreecommitdiff
path: root/docs/ref/utils.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/utils.txt')
-rw-r--r--docs/ref/utils.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index 240cb80485..55a733f376 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -823,8 +823,8 @@ appropriate entities.
from django.utils.translation import pgettext_lazy
urlpatterns = [
- url(format_lazy(r'{person}/(?P<pk>\d+)/$', person=pgettext_lazy('URL', 'person')),
- PersonDetailView.as_view()),
+ path(format_lazy('{person}/<int:pk>/', person=pgettext_lazy('URL', 'person')),
+ PersonDetailView.as_view()),
]
This example allows translators to translate part of the URL. If "person"