File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -605,8 +605,11 @@ def to_internal_value(self, data):
605605 Transform the *incoming* primitive data into a native value.
606606 """
607607 raise NotImplementedError (
608- '{cls}.to_internal_value() must be implemented.' .format (
609- cls = self .__class__ .__name__
608+ '{cls}.to_internal_value() must be implemented for field '
609+ '{field_name}. If you do not need to support write operations '
610+ 'you probably want to subclass `ReadOnlyField` instead.' .format (
611+ cls = self .__class__ .__name__ ,
612+ field_name = self .field_name ,
610613 )
611614 )
612615
@@ -615,9 +618,7 @@ def to_representation(self, value):
615618 Transform the *outgoing* native value into primitive data.
616619 """
617620 raise NotImplementedError (
618- '{cls}.to_representation() must be implemented for field '
619- '{field_name}. If you do not need to support write operations '
620- 'you probably want to subclass `ReadOnlyField` instead.' .format (
621+ '{cls}.to_representation() must be implemented for field {field_name}.' .format (
621622 cls = self .__class__ .__name__ ,
622623 field_name = self .field_name ,
623624 )
You can’t perform that action at this time.
0 commit comments