Skip to content

Commit

Permalink
Merge pull request encode#5005 from nicktimko/patch-1
Browse files Browse the repository at this point in the history
Mention where the mixins live
  • Loading branch information
xordoquy authored Mar 20, 2017
2 parents 73ad88e + 51c6d23 commit 1c33e84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api-guide/viewsets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1c33e84

Please sign in to comment.