aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/serializers.md
diff options
context:
space:
mode:
authorTom Christie2012-10-29 01:50:42 -0700
committerTom Christie2012-10-29 01:50:42 -0700
commitab5c28c5f97c7637d0ccbf6ca9cba02b4b8ad96f (patch)
tree6d1ee204fb95966b18f8b4e9d452d837a6599df8 /docs/api-guide/serializers.md
parent0c71b4c10095f8783f205fc134a475c04a27f01b (diff)
parent586584201967d9810f649def51cef577c65d50fb (diff)
downloaddjango-rest-framework-ab5c28c5f97c7637d0ccbf6ca9cba02b4b8ad96f.tar.bz2
Merge pull request #334 from minddust/restframework2
formatting docs commits
Diffstat (limited to 'docs/api-guide/serializers.md')
-rw-r--r--docs/api-guide/serializers.md2
1 files changed, 0 insertions, 2 deletions
diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md
index 902179ba..c88b9b0c 100644
--- a/docs/api-guide/serializers.md
+++ b/docs/api-guide/serializers.md
@@ -135,7 +135,6 @@ Let's look at an example of serializing a class that represents an RGB color val
"""
A color represented in the RGB colorspace.
"""
-
def __init__(self, red, green, blue):
assert(red >= 0 and green >= 0 and blue >= 0)
assert(red < 256 and green < 256 and blue < 256)
@@ -145,7 +144,6 @@ Let's look at an example of serializing a class that represents an RGB color val
"""
Color objects are serialized into "rgb(#, #, #)" notation.
"""
-
def to_native(self, obj):
return "rgb(%d, %d, %d)" % (obj.red, obj.green, obj.blue)