MCPcopy Index your code
hub / github.com/encode/django-rest-framework / to_internal_value

Method to_internal_value

rest_framework/fields.py:1954–1958  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

1952 MaxLengthValidator(self.max_length, message=message))
1953
1954 def to_internal_value(self, data):
1955 rel = self.model_field.remote_field
1956 if rel is not None:
1957 return rel.model._meta.get_field(rel.field_name).to_python(data)
1958 return self.model_field.to_python(data)
1959
1960 def get_attribute(self, obj):
1961 # We pass the object instance onto `to_representation`,

Callers

nothing calls this directly

Calls 1

to_pythonMethod · 0.45

Tested by

no test coverage detected