mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-03-01 18:00:40 +03:00
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:
parent
73ad88eaae
commit
51c6d23a05
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user