mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-24 23:19:47 +03:00
Update docs/tutorial/6-viewsets-and-routers.md
This commit is contained in:
parent
a6c93f615f
commit
f7a071e54c
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user