aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2014-11-25 11:45:23 +0000
committerTom Christie2014-11-25 11:45:23 +0000
commitb39bd7ce91d75aec6d1aa6593f35e59405ae3aa1 (patch)
tree3b8c2561f7ef84d49f0459d645c58fd9903a61d8
parent06fd63dade20e1a19276b7414a54b9f5d2ef8329 (diff)
parent83e556ba1e129fac28a74b0a2784e4728f491a41 (diff)
downloaddjango-rest-framework-b39bd7ce91d75aec6d1aa6593f35e59405ae3aa1.tar.bz2
Merge pull request #2127 from marctc/patch-1
Missing quotes on validate_score example
-rw-r--r--docs/topics/3.0-announcement.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/3.0-announcement.md b/docs/topics/3.0-announcement.md
index 694ad8a5..6a662326 100644
--- a/docs/topics/3.0-announcement.md
+++ b/docs/topics/3.0-announcement.md
@@ -170,7 +170,7 @@ We strongly recommend that you use the namespaced import style of `import serial
The `validate_<field_name>` method hooks that can be attached to serializer classes change their signature slightly and return type. Previously these would take a dictionary of all incoming data, and a key representing the field name, and would return a dictionary including the validated data for that field:
def validate_score(self, attrs, source):
- if attrs[score] % 10 != 0:
+ if attrs['score'] % 10 != 0:
raise serializers.ValidationError('This field should be a multiple of ten.')
return attrs