From 9a2089ceef83b34c5eb81cd5813f9969ffbff682 Mon Sep 17 00:00:00 2001 From: VladSaichenko Date: Wed, 26 Aug 2020 12:15:35 +0700 Subject: [PATCH 1/3] url(..) updated with path(..) in index.md --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index c7b78e9c33..54654c7c50 100644 --- a/docs/index.md +++ b/docs/index.md @@ -120,7 +120,7 @@ If you're intending to use the browsable API you'll probably also want to add RE urlpatterns = [ ... - url(r'^api-auth/', include('rest_framework.urls')) + path('api-auth/', include('rest_framework.urls')) ] Note that the URL path can be whatever you want. From 71120deda402d393e783f12b6dc4c6a1053c4543 Mon Sep 17 00:00:00 2001 From: VladSaichenko Date: Wed, 26 Aug 2020 12:19:53 +0700 Subject: [PATCH 2/3] url(..)'s were updated with path(..)'s in authentication.md --- docs/api-guide/authentication.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md index ebb0ab4d69..5878040a48 100644 --- a/docs/api-guide/authentication.md +++ b/docs/api-guide/authentication.md @@ -199,7 +199,7 @@ When using `TokenAuthentication`, you may want to provide a mechanism for client from rest_framework.authtoken import views urlpatterns += [ - url(r'^api-token-auth/', views.obtain_auth_token) + path('api-token-auth/', views.obtain_auth_token) ] Note that the URL part of the pattern can be whatever you want to use. @@ -238,7 +238,7 @@ For example, you may return additional user information beyond the `token` value And in your `urls.py`: urlpatterns += [ - url(r'^api-token-auth/', CustomAuthToken.as_view()) + path('api-token-auth/', CustomAuthToken.as_view()) ] From 7a06cc7da8b59ed5b357bd5e2b6437645b4b19f9 Mon Sep 17 00:00:00 2001 From: VladSaichenko Date: Wed, 26 Aug 2020 12:21:55 +0700 Subject: [PATCH 3/3] the url(..) was updated with path(..) in generic-views.md --- docs/api-guide/generic-views.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/generic-views.md b/docs/api-guide/generic-views.md index 4ff549f078..26344536b2 100644 --- a/docs/api-guide/generic-views.md +++ b/docs/api-guide/generic-views.md @@ -45,7 +45,7 @@ For more complex cases you might also want to override various methods on the vi For very simple cases you might want to pass through any class attributes using the `.as_view()` method. For example, your URLconf might include something like the following entry: - url(r'^/users/', ListCreateAPIView.as_view(queryset=User.objects.all(), serializer_class=UserSerializer), name='user-list') + path('/users/', ListCreateAPIView.as_view(queryset=User.objects.all(), serializer_class=UserSerializer), name='user-list') ---