From 103fed966751680d4ac3dc8125b6807e34bb436a Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Fri, 26 Jul 2013 10:59:51 -0400 Subject: [PATCH 1/2] Fixed reversed arguments in assertion --- rest_framework/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 023f7ccfb..682a99a47 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -690,7 +690,7 @@ class ModelSerializer(Serializer): assert field_name in ret, \ "Noexistant field '%s' specified in `read_only_fields` " \ "on serializer '%s'." % \ - (self.__class__.__name__, field_name) + (field_name, self.__class__.__name__) ret[field_name].read_only = True return ret From 9088c18da85bc56b363f5f1995159cc26e102254 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Fri, 26 Jul 2013 11:03:37 -0400 Subject: [PATCH 2/2] Added to the credits --- docs/topics/credits.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/topics/credits.md b/docs/topics/credits.md index dcd147e36..f6e779961 100644 --- a/docs/topics/credits.md +++ b/docs/topics/credits.md @@ -149,6 +149,7 @@ The following people have helped make REST framework great. * Matthias Jacob - [cyroxx] * Pavel Zinovkin - [pzinovkin] * Will Kahn-Greene - [willkg] +* Kevin Brown - [kevin-brown] Many thanks to everyone who's contributed to the project. @@ -334,3 +335,4 @@ You can also contact [@_tomchristie][twitter] directly on twitter. [cyroxx]: https://github.com/cyroxx [pzinovkin]: https://github.com/pzinovkin [willkg]: https://github.com/willkg +[kevin-brown]: https://github.com/kevin-brown