Skip to content

ModelInfoFilterSetChoicesViewSet

Overview

This viewset is for providing metadata about filtering choices to front-end clients. This is a read-only viewset.

Effectively, this is a custom model viewset for content types.

get_queryset

Returns a queryset if the field is a relation. Return a list if the field is not a relation.

Signature

get_queryset(self)

Parameters

NameTypeRequiredDescription
selfyes

Source

server/vueda/info/viewsets.py:475

resolve_choices

Resolve the addressed field, the permissions it requires, and the state that get_queryset needs to build the choices.

DRF calls check_permissions before it calls the handler, so resolution cannot wait for get_queryset. Subclasses store their resolved state on the instance, raise Http404 for a field the model does not offer, and tolerate repeat calls.

Signature

resolve_choices(self)

Parameters

NameTypeRequiredDescription
selfyes

Source

server/vueda/info/viewsets.py:420

validate_queryset

Signature

validate_queryset(self, filterset_instance, filter_mapping)

Parameters

NameTypeRequiredDescription
selfyes
filterset_instanceyes
filter_mappingyes

Source

server/vueda/info/viewsets.py:410

basename

description

detail

name

serializer_class

suffix

Source

server/vueda/info/viewsets.py:401

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2