From 51c6d23a056317aa6c77ed9dc99d247710d6586b Mon Sep 17 00:00:00 2001 From: Nick Timkovich Date: Sun, 19 Mar 2017 17:17:37 -0500 Subject: [PATCH] Mention where the mixins live Ctrl-F on the ViewSets page doesn't show where the `mixins.SomeMixin...` classes come from. --- docs/api-guide/viewsets.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api-guide/viewsets.md b/docs/api-guide/viewsets.md index e6df17f51..a1666c011 100644 --- a/docs/api-guide/viewsets.md +++ b/docs/api-guide/viewsets.md @@ -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: + from rest_framework import mixins + class CreateListRetrieveViewSet(mixins.CreateModelMixin, mixins.ListModelMixin, mixins.RetrieveModelMixin,