mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Add missing import in /api-guide/viewsets/ example (#9235)
This commit is contained in:
parent
ab694eccde
commit
2797c0f216
|
@ -311,7 +311,7 @@ You may need to provide custom `ViewSet` classes that do not have the full set o
|
||||||
|
|
||||||
To create a base viewset class that provides `create`, `list` and `retrieve` operations, inherit from `GenericViewSet`, and mixin the required actions:
|
To create a base viewset class that provides `create`, `list` and `retrieve` operations, inherit from `GenericViewSet`, and mixin the required actions:
|
||||||
|
|
||||||
from rest_framework import mixins
|
from rest_framework import mixins, viewsets
|
||||||
|
|
||||||
class CreateListRetrieveViewSet(mixins.CreateModelMixin,
|
class CreateListRetrieveViewSet(mixins.CreateModelMixin,
|
||||||
mixins.ListModelMixin,
|
mixins.ListModelMixin,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user