mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 21:24:33 +03:00
Merge pull request #5005 from nicktimko/patch-1
Mention where the mixins live
This commit is contained in:
commit
1c33e84e28
|
@ -235,6 +235,8 @@ 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
|
||||||
|
|
||||||
class CreateListRetrieveViewSet(mixins.CreateModelMixin,
|
class CreateListRetrieveViewSet(mixins.CreateModelMixin,
|
||||||
mixins.ListModelMixin,
|
mixins.ListModelMixin,
|
||||||
mixins.RetrieveModelMixin,
|
mixins.RetrieveModelMixin,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user