Mixins
Async model action mixins for the create, list, retrieve, update, and
destroy actions. See the Mixins guide
for action flows and override hooks.
AsyncCreateModelMixin
Create a model instance, served via the async pipeline.
create
async
create(request, *args, **kwargs)
Validates the request body, persists the instance, and returns 201.
aperform_create(serializer)
Saves the new instance, awaiting serializer.asave when available.
get_success_headers(data)
Returns the headers that should be set on the 201 response.
AsyncListModelMixin
List a queryset, served via the async pipeline.
list
async
list(request, *args, **kwargs)
Returns a serialized, optionally paginated list of objects.
AsyncRetrieveModelMixin
Retrieve a model instance, served via the async pipeline.
retrieve
async
retrieve(request, *args, **kwargs)
Returns the serialized representation of a single object.
AsyncUpdateModelMixin
Update a model instance, served via the async pipeline.
update
async
update(request, *args, **kwargs)
Validates the request body, persists the changes, and returns the
updated representation.
aperform_update(serializer)
Saves the updated instance, awaiting serializer.asave when available.
partial_update
async
partial_update(request, *args, **kwargs)
Runs update() with partial=True so PATCH semantics apply.
AsyncDestroyModelMixin
Destroy a model instance, served via the async pipeline.
destroy
async
destroy(request, *args, **kwargs)
Deletes the resolved instance and returns 204.
aperform_destroy(instance)
Deletes the instance, preferring instance.adelete when available.