aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/fields.md
diff options
context:
space:
mode:
authorDave King2014-07-17 11:46:59 +0100
committerDave King2014-07-17 11:46:59 +0100
commit680fabe9dd2307014862beb1c2d77625e808788d (patch)
treecc9e019263cc86bad2d34e57ba244274b5db9818 /docs/api-guide/fields.md
parentdd2e950cde5fc7078303925fa936e59ea4fe363b (diff)
downloaddjango-rest-framework-680fabe9dd2307014862beb1c2d77625e808788d.tar.bz2
Update fields.md
obj.__class__ will return the actual Class object, we want to serialise a string (accessed with obj.__class__.__name__)
Diffstat (limited to 'docs/api-guide/fields.md')
-rw-r--r--docs/api-guide/fields.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index 58dbf977..6d1adcb0 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -347,7 +347,7 @@ As an example, let's create a field that can be used represent the class name of
"""
Serialize the object's class name.
"""
- return obj.__class__
+ return obj.__class__.__name__
# Third party packages