Mention where the mixins live

Ctrl-F on the ViewSets page doesn't show where the `mixins.SomeMixin...` classes come from.
This commit is contained in:
Nick Timkovich 2017-03-19 17:17:37 -05:00 committed by GitHub
parent 73ad88eaae
commit 51c6d23a05

View File

@ -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,