VuedaReadonlySerializer
Overview
Read-only variant of VuedaSerializer. Disables create and update, and marks all fields as read-only. Use for nested expansions that must not be written through the parent serializer.
Meta
Source
server/vueda/core/serializers/__init__.py:784
dir {#dir}
Default dir() implementation.
Signature {#dir-signature}
__dir__(self)
Parameters {#dir-parameters}
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes |
Source {#dir-source}
server/vueda/core/serializers/__init__.py:755
getattribute {#getattribute}
Return getattr(self, name).
Signature {#getattribute-signature}
__getattribute__(self, name)
Parameters {#getattribute-parameters}
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| name | yes |
Source {#getattribute-source}
server/vueda/core/serializers/__init__.py:747
get_field_names
Returns the list of all field names that should be created when instantiating this serializer class. This is based on the default set of fields, but also takes into account the Meta.fields or Meta.exclude options if they have been specified.
Signature
get_field_names(self, declared_fields, info)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| declared_fields | yes | ||
| info | yes |
Source
server/vueda/core/serializers/__init__.py:789
validate_empty_values
Validate empty values, and either:
- Raise
ValidationError, indicating invalid data. - Raise
SkipField, indicating that the field should be ignored. - Return (True, data), indicating an empty value that should be returned without any further validation being applied.
- Return (False, data), indicating a non-empty value, that should have validation applied as normal.
Signature
validate_empty_values(self, data)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| data | yes |
Source
server/vueda/core/serializers/__init__.py:805
_declared_fields
Source
server/vueda/core/serializers/__init__.py:775