rest_witchcraft.viewsets module¶
-
class
rest_witchcraft.viewsets.ExpandableModelViewSet(**kwargs)[source]¶ Bases:
rest_witchcraft.mixins.ExpandableQuerySerializerMixin,rest_witchcraft.viewsets.ModelViewSetA viewset that provides automatically eagerloadsany subfields that are expanded via querystring.
For queryset to be expanded, either
rest_witchcraft.serializers.ExpandableModelSerializerneeds to be used inserializer_classorquery_serializer_classcan be manually provided.
-
class
rest_witchcraft.viewsets.GenericViewSet(**kwargs)[source]¶ Bases:
rest_framework.viewsets.ViewSetMixin,rest_witchcraft.generics.GenericAPIViewThe GenericViewSet class does not provide any actions by default, but does include the base set of generic view behavior, such as the get_object and get_queryset methods.
-
class
rest_witchcraft.viewsets.ModelViewSet(**kwargs)[source]¶ Bases:
rest_framework.mixins.CreateModelMixin,rest_framework.mixins.RetrieveModelMixin,rest_framework.mixins.UpdateModelMixin,rest_witchcraft.mixins.DestroyModelMixin,rest_framework.mixins.ListModelMixin,rest_witchcraft.viewsets.GenericViewSetA viewset that provides default create(), retrieve(), update(), partial_update(), destroy() and list() actions.
-
class
rest_witchcraft.viewsets.ReadOnlyViewModelViewSet(**kwargs)[source]¶ Bases:
rest_framework.mixins.RetrieveModelMixin,rest_framework.mixins.ListModelMixin,rest_witchcraft.viewsets.GenericViewSetA viewset that provides default list() and retrieve() actions.