mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 00:19:53 +03:00
Update docs/tutorial/6-viewsets-and-routers.md
This commit is contained in:
parent
f329d9e1a6
commit
332a3bf913
|
@ -10,7 +10,7 @@ A `ViewSet` class is only bound to a set of method handlers at the last moment,
|
|||
|
||||
Let's take our current set of views, and refactor them into view sets.
|
||||
|
||||
First of all let's refactor our `UserList` and `UserDetail` classes into a single `UserViewSet` class. We can remove the two view classes, and replace them with a single view set class:
|
||||
First of all let's refactor our `UserList` and `UserDetail` classes into a single `UserViewSet` class. We can remove the two view classes, and replace them with a single ViewSet class:
|
||||
|
||||
from rest_framework import viewsets
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user