FlexFieldsMixin
Overview
Mixin for DRF ViewSets to add 'permitted_expands' in serializer context based on the current action. It utilizes 'permit_{action}_expands' attributes of the ViewSet to determine expandable fields for each action (e.g., list, retrieve).
This replaces rest_flex_fields.FlexFieldsMixin and rest_flex_fields.FlexFieldsModelViewSet usage.
get_serializer_context
Signature
get_serializer_context(self)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes |
Source
server/vueda/core/viewsets/__init__.py:740
Source
server/vueda/core/viewsets/__init__.py:731