From 45942a21fd8a2a8969790e460ee7c436a883bcdc Mon Sep 17 00:00:00 2001 From: Leonid Shvechikov Date: Thu, 11 Aug 2016 20:04:35 +0300 Subject: [PATCH] Fix comment for SerializerMethodField.bind method It seems that the example was copy&pasted and not updated properly. --- rest_framework/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index fab79808f..8f12b2df4 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -1656,7 +1656,7 @@ class SerializerMethodField(Field): def bind(self, field_name, parent): # In order to enforce a consistent style, we error if a redundant # 'method_name' argument has been used. For example: - # my_field = serializer.CharField(source='my_field') + # my_field = serializer.SerializerMethodField(method_name='get_my_field') default_method_name = 'get_{field_name}'.format(field_name=field_name) assert self.method_name != default_method_name, ( "It is redundant to specify `%s` on SerializerMethodField '%s' in "