Merge pull request #1029 from etos/patch-1

Spelling correction on read_only_fields err msg
This commit is contained in:
Tom Christie 2013-08-12 01:25:10 -07:00
commit e8288445a7

View File

@ -683,7 +683,7 @@ class ModelSerializer(Serializer):
# in the `read_only_fields` option # in the `read_only_fields` option
for field_name in self.opts.read_only_fields: for field_name in self.opts.read_only_fields:
assert field_name not in self.base_fields.keys(), \ assert field_name not in self.base_fields.keys(), \
"field '%s' on serializer '%s' specfied in " \ "field '%s' on serializer '%s' specified in " \
"`read_only_fields`, but also added " \ "`read_only_fields`, but also added " \
"as an explict field. Remove it from `read_only_fields`." % \ "as an explict field. Remove it from `read_only_fields`." % \
(field_name, self.__class__.__name__) (field_name, self.__class__.__name__)