aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/fields.md
diff options
context:
space:
mode:
authorTom Christie2014-07-22 15:59:04 +0200
committerTom Christie2014-07-22 15:59:04 +0200
commit299a8347e8ef448eefc611eebfe80d7e142ceaa1 (patch)
treea646d9bf04f4f3b85549ea43b16e06e0f2305ae8 /docs/api-guide/fields.md
parent4797b29ed84aaf00e6284c7c834c493266e22999 (diff)
parent680fabe9dd2307014862beb1c2d77625e808788d (diff)
downloaddjango-rest-framework-299a8347e8ef448eefc611eebfe80d7e142ceaa1.tar.bz2
Merge pull request #1692 from davbo/patch-1
Update fields.md
Diffstat (limited to 'docs/api-guide/fields.md')
-rw-r--r--docs/api-guide/fields.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index cebfaac9..813fc381 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
@@ -369,4 +369,4 @@ The [drf-extra-fields][drf-extra-fields] package provides extra serializer field
[strftime]: http://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior
[iso8601]: http://www.w3.org/TR/NOTE-datetime
[drf-compound-fields]: http://drf-compound-fields.readthedocs.org
-[drf-extra-fields]: https://github.com/Hipo/drf-extra-fields \ No newline at end of file
+[drf-extra-fields]: https://github.com/Hipo/drf-extra-fields