Update docs/tutorial/6-viewsets-and-routers.md

This commit is contained in:
Asif Saif Uddin 2022-11-22 12:27:16 +06:00 committed by GitHub
parent a6c93f615f
commit f7a071e54c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,7 +124,7 @@ Here's our re-wired `snippets/urls.py` file.
path('', include(router.urls)),
]
Registering the view sets with the router is similar to providing a urlpattern. We include two arguments - the URL prefix for the views, and the view set itself.
Registering the ViewSets with the router is similar to providing a urlpattern. We include two arguments - the URL prefix for the views, and the view set itself.
The `DefaultRouter` class we're using also automatically creates the API root view for us, so we can now delete the `api_root` function from our `views` module.