Update fields.md

obj.__class__ will return the actual Class object, we want to serialise a string (accessed with obj.__class__.__name__)
This commit is contained in:
Dave King 2014-07-17 11:46:59 +01:00
parent dd2e950cde
commit 680fabe9dd

View File

@ -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