Transform the *incoming* primitive data into a native value.
(self, data)
| 564 | raise ValidationError(errors) |
| 565 | |
| 566 | def to_internal_value(self, data): |
| 567 | """ |
| 568 | Transform the *incoming* primitive data into a native value. |
| 569 | """ |
| 570 | raise NotImplementedError( |
| 571 | '{cls}.to_internal_value() must be implemented for field ' |
| 572 | '{field_name}. If you do not need to support write operations ' |
| 573 | 'you probably want to subclass `ReadOnlyField` instead.'.format( |
| 574 | cls=self.__class__.__name__, |
| 575 | field_name=self.field_name, |
| 576 | ) |
| 577 | ) |
| 578 | |
| 579 | def to_representation(self, value): |
| 580 | """ |
no outgoing calls