CompositePrimaryKeyField
Overview
CompositePrimaryKey returns the pk as a json list: '["1", "1"]'
Internally it needs to convert it back to a list or tuple queries won't work: TupleExact TupleGreaterThan TupleGreaterThanOrEqual TupleLessThan TupleLessThanOrEqual TupleIn TupleIsNull
to_internal_value
Transform the incoming primitive data into a native value.
Signature
to_internal_value(self, data)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| data | yes |
Source
server/vueda/core/serializers/fields.py:141
to_representation
Transform the outgoing native value into primitive data.
Signature
to_representation(self, value)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| value | yes |
Source
server/vueda/core/serializers/fields.py:126
Source
server/vueda/core/serializers/fields.py:111