File tree 1 file changed +6
-5
lines changed
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):
605
605
Transform the *incoming* primitive data into a native value.
606
606
"""
607
607
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 ,
610
613
)
611
614
)
612
615
@@ -615,9 +618,7 @@ def to_representation(self, value):
615
618
Transform the *outgoing* native value into primitive data.
616
619
"""
617
620
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 (
621
622
cls = self .__class__ .__name__ ,
622
623
field_name = self .field_name ,
623
624
)
You can’t perform that action at this time.
0 commit comments