summaryrefslogtreecommitdiff
path: root/docs/topics/class-based-views/generic-editing.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/topics/class-based-views/generic-editing.txt')
-rw-r--r--docs/topics/class-based-views/generic-editing.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/topics/class-based-views/generic-editing.txt b/docs/topics/class-based-views/generic-editing.txt
index 3fde51253a..69f2158021 100644
--- a/docs/topics/class-based-views/generic-editing.txt
+++ b/docs/topics/class-based-views/generic-editing.txt
@@ -149,14 +149,14 @@ Finally, we hook these new views into the URLconf:
.. snippet::
:filename: urls.py
- from django.conf.urls import url
+ from django.urls import path
from myapp.views import AuthorCreate, AuthorUpdate, AuthorDelete
urlpatterns = [
# ...
- url(r'author/add/$', AuthorCreate.as_view(), name='author-add'),
- url(r'author/(?P<pk>[0-9]+)/$', AuthorUpdate.as_view(), name='author-update'),
- url(r'author/(?P<pk>[0-9]+)/delete/$', AuthorDelete.as_view(), name='author-delete'),
+ path('author/add/', AuthorCreate.as_view(), name='author-add'),
+ path('author/<int:pk>/', AuthorUpdate.as_view(), name='author-update'),
+ path('author/<int:pk>/delete/', AuthorDelete.as_view(), name='author-delete'),
]
.. note::