diff --git a/api-guide/generic-views.html b/api-guide/generic-views.html index c6d6194c3..40eb204ec 100644 --- a/api-guide/generic-views.html +++ b/api-guide/generic-views.html @@ -115,6 +115,7 @@
The following classes are the concrete generic views. If you're using generic views this is normally the level you'll be working at unless you need heavily customized behavior.
Used for read-only endpoints to represent a collection of model instances.
+Used for read-only endpoints to represent a collection of model instances.
Provides a get
method handler.
Extends: MultipleObjectBaseAPIView, ListModelMixin
Used for read-write endpoints to represent a collection of model instances.
+Used for read-write endpoints to represent a collection of model instances.
Provides get
and post
method handlers.
Extends: MultipleObjectBaseAPIView, ListModelMixin, CreateModelMixin
Used for read-only endpoints to represent a single model instance.
+Used for read-only endpoints to represent a single model instance.
Provides a get
method handler.
Extends: SingleObjectBaseAPIView, RetrieveModelMixin
+Used for read or delete endpoints to represent a single model instance.
+Provides get
and delete
method handlers.
Extends: SingleObjectBaseAPIView, RetrieveModelMixin, DestroyModelMixin
Used for read-write endpoints to represent a single model instance.
+Used for read-write endpoints to represent a single model instance.
Provides get
, put
and delete
method handlers.
Extends: SingleObjectBaseAPIView, RetrieveModelMixin, UpdateModelMixin, DestroyModelMixin
The mixin classes provide the actions that are used to provide the basic view behaviour. Note that the mixin classes provide action methods rather than defining the handler methods such as .get()
and .post()
directly. This allows for more flexible composition of behaviour.
Provides a .list(request, *args, **kwargs)
method, that implements listing a queryset.
Should be mixed in with MultipleObjectBaseAPIView.
Provides a .create(request, *args, **kwargs)
method, that implements creating and saving a new model instance.
Should be mixed in with any BaseAPIView.
Provides a .retrieve(request, *args, **kwargs)
method, that implements returning an existing model instance in a response.
Should be mixed in with SingleObjectBaseAPIView.
Provides a .update(request, *args, **kwargs)
method, that implements updating and saving an existing model instance.
Should be mixed in with SingleObjectBaseAPIView.
Provides a .destroy(request, *args, **kwargs)
method, that implements deletion of an existing model instance.
Should be mixed in with SingleObjectBaseAPIView.